3 Replies Latest reply on Mar 9, 2008 2:49 PM by Denis FLOCH

    Portlet Container 2.0B1 : NullPointerException at PortletReq

    Denis FLOCH Newbie

      Hello,

      I try to use Portlet Container 2.0 (bundled with Tomcat6) with Spring Portlet mvc. I made a war with the phonebook-portlet example from Spring and I referenced the application into the simple-portal war. I modified the demo3.jsp like this :
      ....
      <jbp:layout1>
      <jsp:attribute name="leftcol">
      <jbp:portlet name="Foo" applicationName="bar"/>
      </jsp:attribute>
      <jsp:attribute name="rightcol">
      <jbp:portlet name="phonebook" applicationName="SpringPocPortlet"/>

      <jbp:portlet name="HeaderPortlet" applicationName="samples-basic" id="header-portlet"/>

      </jsp:attribute>
      </jbp:layout1>
      ....

      I got the following exception :

      java.lang.NullPointerException
      at org.jboss.portal.portlet.impl.jsr168.PortletRequestAttributes.getAttribute(PortletRequestAttributes.java:116)
      at org.jboss.portal.portlet.impl.jsr168.api.PortletRequestImpl.getAttribute(PortletRequestImpl.java:248)
      at org.springframework.web.portlet.FrameworkPortlet.getUsernameForRequest(FrameworkPortlet.java:549)
      at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:513)
      at org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:457)
      at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:536)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:473)
      at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      at org.jboss.portal.portlet.aspects.portlet.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:118)
      at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:45)
      at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:104)
      at org.jboss.portal.web.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.portal.web.command.CommandServlet.doGet(CommandServlet.java:130)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
      at org.jboss.portal.web.command.CommandServlet.include(CommandServlet.java:79)
      at org.jboss.portal.web.command.CommandDispatcher.include(CommandDispatcher.java:50)
      at org.jboss.portal.web.impl.tomcat.TC6ServletContainerContext.include(TC6ServletContainerContext.java:83)
      at org.jboss.portal.web.ServletContainer.include(ServletContainer.java:182)
      at org.jboss.portal.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69)
      at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:76)
      at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:68)
      at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:60)
      at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
      at org.jboss.portal.portlet.container.PortletContainerInvoker.invoke(PortletContainerInvoker.java:196)
      at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:233)
      at org.jboss.portal.portlet.test.controller.TestPortletInvoker$1.invoke(TestPortletInvoker.java:67)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      at org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:159)
      at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
      at org.jboss.portal.portlet.test.controller.TestPortletInvoker.invoke(TestPortletInvoker.java:112)
      at org.jboss.portal.portlet.test.jsp.PagePortletControllerContext.invoke(PagePortletControllerContext.java:105)
      at org.jboss.portal.portlet.test.jsp.PortalRenderResponse.render(PortalRenderResponse.java:184)
      at org.jboss.portal.portlet.test.jsp.PortalRenderResponse.render(PortalRenderResponse.java:201)
      at org.jboss.portal.portlet.test.jsp.PortalRenderResponse.(PortalRenderResponse.java:102)
      at org.jboss.portal.portlet.test.jsp.ControllerFilter.doFilter(ControllerFilter.java:238)
      at org.jboss.portal.portlet.test.jsp.ControllerFilter.doFilter(ControllerFilter.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)

      Any idea where the problem come from?

      Denis FLOCH