5 Replies Latest reply on Jan 15, 2009 2:28 PM by nimo stephan

    Help! - NPE on string page parameter in EL

    Terry Apprentice

      Having upgraded to Seam 2.1.0.SP, I am sudddenly getting NullPointerException on String page paramters.


      I use some page paramters just to pass on to next page via page navigation, like below, but now doesnt like evaluating parameter anymore:


      <page ...>
      
        <param name="courseSysCourseIdList"/>
      
        <navigation from-action="#{courseSysCourseAction.editCourseAction}">
          <rule if-outcome="valid">
            <redirect view-id="#{'orgUserAuthenticated.isLicensee'}">
      
              <param name="courseSysCourseId" value="#{courseSysCourseIdList}"/>
      
            </redirect>
          </rule>
        </navigation>
      </page>
      
      





      WARN  [Param] could not create converter for: courseSysCourseId
      java.lang.NullPointerException
           at org.jboss.seam.jsf.SeamApplication$ConverterLocator.locateConverter(SeamApplication.java:166)
           at org.jboss.seam.jsf.SeamApplication$ConverterLocator.getConverter(SeamApplication.java:148)
           at org.jboss.seam.jsf.SeamApplication.createConverter(SeamApplication.java:122)
           at org.jboss.seam.navigation.Param.getConverter(Param.java:66)
           at org.jboss.seam.navigation.Param.getStringValueFromModel(Param.java:143)
           at org.jboss.seam.navigation.RedirectNavigationHandler.navigate(RedirectNavigationHandler.java:46)
           at org.jboss.seam.navigation.Rule.execute(Rule.java:100)
           at org.jboss.seam.navigation.Navigation.navigate(Navigation.java:58)
           at org.jboss.seam.navigation.Pages.navigate(Pages.java:206)
           at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:42)
           at org.jboss.seam.navigation.Pages.handleOutcome(Pages.java:671)
           at org.jboss.seam.navigation.Pages.callAction(Pages.java:713)
           at org.jboss.seam.navigation.Pages.preRender(Pages.java:349)
           at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:562)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:473)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
           at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           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:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:543)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
           at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:853)
           at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
           at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)
           at java.lang.Thread.run(Thread.java:619)
      

        • 1. Re: Help! - NPE on string page parameter in EL
          Terry Apprentice
          Any clues, anyone use page parameters this way and have problem?

          In .page.xml define it like this, without value attribute:

            <param name="courseSysCourseIdList"/>

          then use it in page navigation like this:

            <param name="courseSysCourseId" value="#{courseSysCourseIdList}"/>

          • 2. Re: Help! - NPE on string page parameter in EL
            Dan Allen Master

            There is a known bug in Seam 2.1 regarding the use of page parameters on redirects. It seems to affect multiple usage scenarios, so likely there is a missing bit of code that is causing a ripple effect. I am working on it today and thus is expected to be part of 2.1.1. I will validate your problem is resolved.

            • 3. Re: Help! - NPE on string page parameter in EL
              Dan Allen Master

              As it turns out, the problem you were seeing was a result of a bug in the hot deploy mechanism. This will be fixed in 2.1.1.

              • 4. Re: Help! - NPE on string page parameter in EL
                Terry Apprentice

                Dan thank you for looking into it. I can now look forward to 2.1.1 release.


                • 5. Re: Help! - NPE on string page parameter in EL
                  nimo stephan Master

                  I am using SEAM 2.1.1 GA and RichFaces 3.3 and get this failure after upgrading RichFaces 3.2 to RichFaces 3.3:



                  13:25:34,468 INFO  [STDOUT] AfterPhase: INVOKE_APPLICATION 5
                  13:25:34,484 INFO  [STDOUT] BeforePhase: RENDER_RESPONSE 6
                  13:25:34,530 ERROR [viewhandler] Error Rendering View[/ui/myView.xhtml]
                  java.lang.NullPointerException
                       at org.jboss.seam.jsf.SeamApplication$ConverterLocator.locateConverter(SeamApplication.java:166)
                       at org.jboss.seam.jsf.SeamApplication$ConverterLocator.getConverter(SeamApplication.java:148)
                       at org.jboss.seam.jsf.SeamApplication.createConverter(SeamApplication.java:122)
                       at org.richfaces.component.UIOrderingBaseComponent.getConverterForType(UIOrderingBaseComponent.java:534)
                       at org.richfaces.component.UIOrderingBaseComponent.getConverterForValue(UIOrderingBaseComponent.java:559)
                       at org.richfaces.renderkit.OrderingComponentRendererBase.getConverter(OrderingComponentRendererBase.java:574)
                       at org.richfaces.renderkit.ListShuttleRendererBase.encodeRows(ListShuttleRendererBase.java:116)
                       at org.richfaces.renderkit.html.ListShuttleRenderer.doEncodeChildren(ListShuttleRenderer.java:267)
                       at org.richfaces.renderkit.html.ListShuttleRenderer.doEncodeChildren(ListShuttleRenderer.java:257)
                       at org.richfaces.renderkit.ListShuttleRendererBase.encodeChildren(ListShuttleRendererBase.java:244)
                       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
                       at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:291)ava:122)



                  Any help?