Hi Andreas,
I assume you are using Pluto 1.0.1. Most of the NPE problems I've run into have to do with improperly deployed portlets. Please manually remove any old deployments of your portlet from portletentityregistry.xml, pageregistry.xml and portletcontexts.txt in the webapps/pluto/WEB-INF/data directory of your Pluto install. There is a copy of the Javaworld bookmark portlet on the Yahoo portlet group site that I have copied to here: http://people.apache.org/~cdoremus/pluto/portlets . I have successfully deployed it using the Pluto 1.0.1 admin console (Admin link). Read the help file (help mode) in the DeployWarPortlet for details. This war file also contains all the original source code.
/Craig



Andreas Buechler <[EMAIL PROTECTED]>

11/06/2005 10:01 AM

Please respond to
[email protected]

To
[email protected]
cc
Subject
Re: NullPointerException in doView()





Craig,

thanks for this hint. I get the same error with a newer example from the
book "Portlets and Apache Portals" (you can get it for free @
http://www.manning-sandbox.com/index.jspa). I checked  
portletcontexts.txt as mentioned in the archives and everything looks
good. Also cross context  is enabled in pluto.xml.

Maybe I'm missing your point?

Regards,
Andi

>
> Andreas,
> See http://portals.apache.org/pluto/faq.html#javaworld
> /Craig
>
>> Hi,
>>
>> I'm trying to get a bookmark portlet example [1] to run on pluto.
>> Deploying it with the admin portlet works fine, but if I try to
>> access the portlet I get a NullPointerException. In the logs I see
>> that error must be in doView():
>>
>> 5.11.2005 15:14:01
>> org.apache.pluto.portalImpl.services.log.LoggerImpl error
>> SCHWERWIEGEND: Error in Portlet
>> java.lang.NullPointerException
>>    at portlets.BookmarkPortlet.doView(BookmarkPortlet.java:37)
>>    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:250)
>>    at javax.portlet.GenericPortlet.render(GenericPortlet.java:178)
>>    at
>> org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218)
>>
>> My function doView() looks like:
>>
>>    public void doView (RenderRequest request,
>>            RenderResponse response)
>>            throws PortletException, IOException
>>            {
>>            PortletConfig config = getPortletConfig();
>>                      response.setContentType("text/html");
>>            String jspName = config.getInitParameter("jspView");
>>            try{
>>            PortletRequestDispatcher rd =
>>            getPortletContext().getRequestDispatcher(jspName);
>>            rd.include(request,response);
>>            }catch(Exception e){
>>                System.out.println(e.getMessage());
>>            }
>>            }
>>
>> Unfortunately starting tomcat in debug modus didn't reveal more
>> information. Does anybody have an idea what might cause the exception
>> or how I could use the logging infrastructure of pluto to get the
>> message of the exception?
>>
>> [1]
>> http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-portlet2-p2.html
>>
>>
>> Regards,
>> Andi
>>
>>
>>
>


Reply via email to