6 Replies Latest reply on Jul 9, 2007 4:11 PM by D N

    Nullpointer Exception while accessing Seam Component

    Frank Roehler Newbie

      Hello,

      I'm working for a simple Pageflow, realised in Seam, for a while. I thougt I got it running but something is missing.
      When accessing a Seam Component over a jsp-file like:

      <h:outputText value="#{purchaseOrder1.number}"/>


      the function getNumber() in the component-class PurchaseOrder1 is called and I get the error-message from the browser:

      javax.servlet.ServletException: Cannot get value for expression '#{purchaseOrder1.number}'
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
      org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)




      and the app-server says:

      16:44:37,062 ERROR [STDERR] java.lang.NullPointerException
      16:44:37,062 ERROR [STDERR] at org.jboss.seam.core.Pageflow.begin(Pageflow.java:191)
      16:44:37,062 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
      ceptor.beginNavigation(ConversationInterceptor.java:200)
      16:44:37,062 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
      ceptor.beginConversation(ConversationInterceptor.java:186)
      16:44:37,062 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
      ceptor.beginConversationIfNecessary(ConversationInterceptor.java:146)
      16:44:37,062 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
      ceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:70)
      16:44:37,062 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
      Native Method)


      and many more. My code is oriented on the numberguess-example. Without calling the seam-component the jsp-site starts very well with URI-mapping
      http://localhost:8080/seam-purchaseOrder1/purchaseOrder1.seam

      but without initiating the pageflow.

      Thanks for your help,
      Regards Frank

        • 1. Re: Nullpointer Exception while accessing Seam Component
          Gavin King Master

          What version of Seam is this?

          please show the whole stack trace.

          • 2. Re: Nullpointer Exception while accessing Seam Component
            Frank Roehler Newbie

            I'm using version 1.0.00.CR3.
            Whole stacktrace of the browser (IE6):


            javax.servlet.ServletException: Cannot get value for expression '#{purchaseOrder1.number}'
            javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
            org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


            root cause

            javax.faces.FacesException: Cannot get value for expression '#{purchaseOrder1.number}'
            org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
            org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
            org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
            org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
            javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
            org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


            whole stacktrace of jboss AS (hope this works):

            17:20:08,562 ERROR [STDERR] java.lang.NullPointerException
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.core.Pageflow.begin(Pageflow.java:191)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
            ceptor.beginNavigation(ConversationInterceptor.java:200)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
            ceptor.beginConversation(ConversationInterceptor.java:186)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
            ceptor.beginConversationIfNecessary(ConversationInterceptor.java:146)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInter
            ceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:70)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
            ativeMethodAccessorImpl.java:39)
            17:20:08,562 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
            ke(DelegatingMethodAccessorImpl.java:25)
            17:20:08,562 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            17:20:08,562 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            17:20:08,562 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.TransactionInterc
            eptor.doInTransactionIfNecessary(TransactionInterceptor.java:34)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            17:20:08,562 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            17:20:08,562 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            17:20:08,562 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
            ke(DelegatingMethodAccessorImpl.java:25)
            17:20:08,562 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
            17:20:08,562 ERROR [STDERR] at com.jaxfront.seam.PurchaseOrder1$$EnhancerByCGLIB$$71ee1296.begin(<generated>)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            17:20:08,562 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            17:20:08,562 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
            ke(DelegatingMethodAccessorImpl.java:25)
            17:20:08,562 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.Component.callComponentMethod(Component.java:1239)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.Component.callCreateMethod(Component.java:1227)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.Component.newInstance(Component.java:1216)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1168)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1151)
            17:20:08,562 ERROR [STDERR] at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
            17:20:08,562 ERROR [STDERR] at org.apache.myfaces.el.ValueBindingImpl$ELVari
            ableResolver.resolveVariable(ValueBindingImpl.java:569)
            17:20:08,562 ERROR [STDERR] at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
            17:20:08,562 ERROR [STDERR] at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
            17:20:08,562 ERROR [STDERR] at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
            17:20:08,578 ERROR [STDERR] at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
            17:20:08,578 ERROR [STDERR] at org.apache.myfaces.renderkit.RendererUtils.getStringValue(RendererUtils.java:225)
            17:20:08,578 ERROR [STDERR] at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:65)
            17:20:08,578 ERROR [STDERR] at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
            17:20:08,578 ERROR [STDERR] at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
            17:20:08,578 ERROR [STDERR] at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
            17:20:08,578 ERROR [STDERR] at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
            17:20:08,578 ERROR [STDERR] at org.apache.jsp.purchaseOrder1_jsp._jspx_meth_h_outputText_0(purchaseOrder1_jsp.java:166)
            17:20:08,578 ERROR [STDERR] at org.apache.jsp.purchaseOrder1_jsp._jspx_meth_h_form_0(purchaseOrder1_jsp.java:137)
            17:20:08,578 ERROR [STDERR] at org.apache.jsp.purchaseOrder1_jsp._jspx_meth_f_view_0(purchaseOrder1_jsp.java:105)
            17:20:08,578 ERROR [STDERR] at org.apache.jsp.purchaseOrder1_jsp._jspService(purchaseOrder1_jsp.java:69)
            17:20:08,578 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
            17:20:08,578 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            17:20:08,578 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
            17:20:08,578 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
            17:20:08,578 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            17:20:08,578 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
            17:20:08,578 ERROR [STDERR] at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
            17:20:08,578 ERROR [STDERR] at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
            17:20:08,578 ERROR [STDERR] at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
            17:20:08,578 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
            17:20:08,578 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            17:20:08,578 ERROR [STDERR] at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            17:20:08,578 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            17:20:08,578 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
            17:20:08,578 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValv
            e.invoke(JaccContextValve.java:74)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            17:20:08,578 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            17:20:08,578 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
            17:20:08,578 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
            17:20:08,578 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
            17:20:08,578 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
            17:20:08,578 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
            17:20:08,578 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
            javax.faces.el.EvaluationException: Cannot get value for expression '#{purchaseOrder1.number}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
            :397)
            at javax.faces.component.UIOutput.getValue(UIOutput.java:75)
            at org.apache.myfaces.renderkit.RendererUtils.getStringValue(RendererUtils.java:225)
            at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:65)
            at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
            at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
            at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
            at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
            at org.apache.jsp.purchaseOrder1_jsp._jspx_meth_h_outputText_0(purchaseO
            rder1_jsp.java:166)
            at org.apache.jsp.purchaseOrder1_jsp._jspx_meth_h_form_0(purchaseOrder1_
            jsp.java:137)
            at org.apache.jsp.purchaseOrder1_jsp._jspx_meth_f_view_0(purchaseOrder1_
            jsp.java:105)
            at org.apache.jsp.purchaseOrder1_jsp._jspService(purchaseOrder1_jsp.java:69)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
            14)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            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.processRequest(ApplicationDispatcher.java:463)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
            at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
            at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
            at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
            at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
            rocessConnection(Http11BaseProtocol.java:664)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
            at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
            at java.lang.Thread.run(Thread.java:595)
            Caused by: java.lang.NullPointerException
            at org.jboss.seam.core.Pageflow.begin(Pageflow.java:191)
            at org.jboss.seam.interceptors.ConversationInterceptor.beginNavigation(ConversationInterceptor.java:200)
            at org.jboss.seam.interceptors.ConversationInterceptor.beginConversation
            (ConversationInterceptor.java:186)
            at org.jboss.seam.interceptors.ConversationInterceptor.beginConversationIfNecessary(ConversationInterceptor.java:146)
            at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:70)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusiness
            ProcessContext(BusinessProcessInterceptor.java:60)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfN
            ecessary(TransactionInterceptor.java:34)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
            at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
            at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
            at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
            at com.jaxfront.seam.PurchaseOrder1$$EnhancerByCGLIB$$71ee1296.begin(<ge
            nerated>)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
            at org.jboss.seam.Component.callComponentMethod(Component.java:1239)
            at org.jboss.seam.Component.callCreateMethod(Component.java:1227)
            at org.jboss.seam.Component.newInstance(Component.java:1216)
            at org.jboss.seam.Component.getInstance(Component.java:1168)
            at org.jboss.seam.Component.getInstance(Component.java:1151)
            at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
            at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVari
            able(ValueBindingImpl.java:569)
            at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
            at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
            at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
            ... 49 more
            17:20:08,578 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
            javax.faces.FacesException: Cannot get value for expression '#{purchaseOrder1.number}'
            at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
            at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
            at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
            at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
            rocessConnection(Http11BaseProtocol.java:664)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
            at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
            at java.lang.Thread.run(Thread.java:595)
            Caused by: org.apache.jasper.JasperException: Cannot get value for expression '#{purchaseOrder1.number}'
            at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            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.processRequest(ApplicationDispatcher.java:463)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
            at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
            h(ServletExternalContextImpl.java:415)
            ... 25 more


            • 3. Re: Nullpointer Exception while accessing Seam Component
              David Bernard Newbie

              line 191 is a comment in Pageflow 1.0.0.CR3!!!

              I'd got a similar problem. The displaing exception isn't the root one. In my case, the cause was that the PageflowProcessDefinition wasn't define (=> NPE). So check if the pageflow is define :
              check in web.xml :

               <context-param>
              <param-name>org.jboss.seam.core.jbpm.pageflowDefinitions</param-name>
               <param-value>
               mypageflow.jpdl.xml
               </param-value>
               </context-param>
              


              check that the name use in @begin is the same as the one used in the name attribut's of root node <pageflow-definition name="mypageflow"> of the mypageflow.jpdl.xml

              check that mypageflow is accessible (eg: root of the ear)

              May it could help

              • 4. Re: Nullpointer Exception while accessing Seam Component
                Frank Roehler Newbie

                Hey dwayneb,

                you got it, thanks a lot. The name of the pageflow-definition in the java-class was wrong. The first letter wasn't a capitel one, rest was correct.

                Greets,
                Frank

                • 5. Re: Nullpointer Exception while accessing Seam Component
                  Gavin King Master

                  I changed Seam to throw a more meaningful exception.

                  • 6. Re: Nullpointer Exception while accessing Seam Component
                    D N Newbie

                    I had a similar problem with Seam 2.0.0 Beta. There is a seam-drools example within the package which doesn't work and ends also with NullPointerException in ConversationInterceptor.beginNavigation method.

                    The point is that the namespace of JBPM tags in components.xml changed.

                    Old components.xml section:

                     <core:jbpm>
                     <core:pageflow-definitions>
                     <value>pageflow.jpdl.xml</value>
                     </core:pageflow-definitions>
                     </core:jbpm>
                    


                    New components.xml section:
                     <bpm:jbpm>
                     <bpm:pageflow-definitions>
                     <value>pageflow.jpdl.xml</value>
                     </bpm:pageflow-definitions>
                     </bpm:jbpm>
                    

                    Even if I read Seam documentation, I overlooked the little change and spent some hours tracing it why the JBPM doesn't load.

                    David Navara