Hi all
I've been getting a lot of nullpointer exceptions and think I've found
the problem. It's actually somehow caused by my environment which
looks something like this:
I have a tomcat with an old pluto installation (about a month old). I
modified the war file there to include new portlets.
I also added the invoker servlet by hand since the deployment has
somewhat changed in svn.
So now, I copy my war to the tomcat along with the context.xml for
conf/Catalina/localhost.
It appears that, under this constellation, the context.xml isn't alway
picked up and cross context is disabled.
I'd suggest checking for a null ctx variable in PorltetEntity.load and
throw an exception with a meaningful message like "is cross context
dispatching enabled?".
Here's an example stacktrace:
java.lang.NullPointerException
at
org.apache.pluto.core.PortletDescriptorRegistry.createDefinition(PortletDescriptorRegistry.java:119)
at
org.apache.pluto.core.PortletDescriptorRegistry.getPortletAppDD(PortletDescriptorRegistry.java:103)
at org.apache.pluto.core.PortletEntity.load(PortletEntity.java:105)
at
org.apache.pluto.core.PortletEntity.getPortletDefinition(PortletEntity.java:89)
at
org.apache.pluto.core.impl.RenderResponseImpl.isValidContentType(RenderResponseImpl.java:194)
at
org.apache.pluto.core.impl.RenderResponseImpl.setContentType(RenderResponseImpl.java:105)
at
org.springframework.web.portlet.DispatcherPortlet.render(DispatcherPortlet.java:1070)
at
org.springframework.web.portlet.DispatcherPortlet.doRenderDispatch(DispatcherPortlet.java:894)
at
org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:724)
at
org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:433)
at
org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:400)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:162)
at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:113)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.pluto.core.PortletInvoker.invoke(PortletInvoker.java:156)
at org.apache.pluto.core.PortletInvoker.render(PortletInvoker.java:103)
at
org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:140)
at
org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:94)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:96)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:71)
Patrick
--
"I love deadlines. I like the whooshing sound they make as they fly
by." -- Douglas Adams