If you subclass MyFacesGenericPortlet and call nonFacesRequest(...) you must first call setPortletRequestFlag(request);
This is very non-obvious and so I'll suggest a better way in a new thread Dave Brondsema wrote: > I'm developing a portlet using MyFaces and extending the > MyFacesGenericPortlet class. After working some and doing several > redeploys, I get the following NPE. I have to restart Tomcat for it to > work again. Any idea why? Thanks! > > > Aug 29, 2005 3:49:18 PM org.apache.catalina.core.ApplicationDispatcher > invoke > SEVERE: Servlet.service() for servlet FoodServiceMenu threw exception > java.lang.NullPointerException > at > org.apache.myfaces.application.jsp.JspViewHandlerImpl.getServletMapping(JspViewHandlerImpl.java:354) > at > org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:193) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:299) > at > org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:304) > at > edu.cornerstone.portal.portlets.foodservicemenu.MyFacesModalPortlet.doEdit(MyFacesModalPortlet.java:61) > at > edu.cornerstone.portal.portlets.foodservicemenu.FoodServiceMenuPortlet.doEdit(FoodServiceMenuPortlet.java:24) > at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:253) > at javax.portlet.GenericPortlet.render(GenericPortlet.java:178) > at > edu.cornerstone.portal.portlets.foodservicemenu.MyFacesModalPortlet.render(MyFacesModalPortlet.java:55) > at > org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:205) > at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:145) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:140) > 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.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120) > at > org.apache.pluto.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:73) > at > org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:105) > at > org.jasig.portal.channels.portlet.CPortletAdapter.getMarkup(CPortletAdapter.java:574) > at > org.jasig.portal.channels.portlet.CPortletAdapter.renderCharacters(CPortletAdapter.java:497) > at > org.jasig.portal.MultithreadedCharacterChannelAdapter.renderCharacters(MultithreadedCharacterChannelAdapter.java:41) > at > org.jasig.portal.channels.error.CError.renderCharacters(CError.java:521) > at > org.jasig.portal.ChannelRenderer$Worker.execute(ChannelRenderer.java:477) > at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:27) > at > edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:418) > at > edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:165) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:660) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:685) > at java.lang.Thread.run(Thread.java:595) > -- Dave Brondsema Software Developer Cornerstone University
signature.asc
Description: OpenPGP digital signature