12 Replies Latest reply on Mar 17, 2008 2:10 PM by Karl Traunmüller

    Conversation.instance().isLongRunning() - NullPointerException

    Michael Kelly Newbie

      Morning,
        I've encountered a problem when trying to determine if my app is in a long running conversation.  I have three debug lines in my code :



      log.debug( "Conversation " + Conversation.instance() );
      log.debug( "Conversation id " +, Conversation.instance().getId() );
      log.debug( "Conversation long running #0", Conversation.instance().isLongRunning() );     




      But the app throws an exception on the third debug line - the seam Manager class seems to be throwing a NullPointerException - can anyone help please?



      09:52:16,937 DEBUG [EditRoutingPlanBean] Conversation org.jboss.seam.core.Conversation@4066db
      09:52:16,937 DEBUG [EditRoutingPlanBean] Conversation id 6
      09:52:16,937 ERROR [SeamPhaseListener] uncaught exception
      javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException
              at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
              at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
              at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
              at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:148)
              at org.jboss.seam.pages.Page.enter(Page.java:229)
              at org.jboss.seam.core.Pages.enterPage(Pages.java:276)
              at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276)
              at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214)
              at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
              at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
              at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
              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:179)
              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.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.ejb.EJBTransactionRolledbackException
              at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:94)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
              at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:117)
              at $Proxy452.load(Unknown Source)
              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:20)
              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
              at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
              at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
              at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
              at org.javassist.tmp.java.lang.Object_$$_javassist_181.load(Object_$$_javassist_181.java)
              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.apache.el.parser.AstValue.invoke(AstValue.java:131)
              at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
              at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
              ... 43 more
      Caused by: java.lang.NullPointerException
              at org.jboss.seam.core.Manager.isReallyLongRunningConversation(Manager.java:247)
              at org.jboss.seam.core.Conversation.isLongRunning(Conversation.java:312)
              at uk.co.netdev.cie.prov.gui.routing.EditRoutingPlanBean.load(EditRoutingPlanBean.java:59)
              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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
              at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
              at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.interceptors.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:63)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
              at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
              at sun.reflect.GeneratedMethodAccessor396.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
              at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
              ... 79 more
      09:52:17,015 WARN  [lifecycle] phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@ab746e) threw exception: java.lang.NullPointerException null
      org.ajax4jsf.context.AjaxContextImpl.saveViewState(AjaxContextImpl.java:497)
      org.ajax4jsf.event.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:81)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
      org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
      org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:595)
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
        


        • 3. Re: Conversation.instance().isLongRunning() - NullPointerException
          Nicklas Karlsson Master

          Hmm, giving a glance at the source code and the trace it could be the getCurrentConversationEntry() that returns null. Not that I can think of why it would do that since the two other debug lines work...

          • 4. Re: Conversation.instance().isLongRunning() - NullPointerException
            Keith Naas Novice

            Aha....1.2.1.GA with an NPE in Conversation area...why does this sound so familiar :)


            Looking at the source for Manager.java in version 1.2.1.GA, here is the culprit


               public boolean isReallyLongRunningConversation()
               {
                  return isLongRunningConversation() && 
                        !getCurrentConversationEntry().isRemoveAfterRedirect() && // right here!
                        !Seam.isSessionInvalid();
               }
            



            Try manually looking up the conversation in the ConversationEntries component


            ConversationEntries.instance().getConversationEntry(Conversation.instance().getId())
            



            Also, try printing out the value of


            Manager.instance().getCurrentConversationId()
            

            • 5. Re: Conversation.instance().isLongRunning() - NullPointerException
              Michael Kelly Newbie

              Hi Keith,
                thanks for your help - ok, I've tried both of the above:


              Manager.instance().getCurrentConversationId() returns with the conversation id just fine - however, ConversationEntries.instance().getConversationEntry(Conversation.instance().getId()) returns null.


              Cheers
              Mike

              • 6. Re: Conversation.instance().isLongRunning() - NullPointerException
                Keith Naas Novice

                Can you try printing out what is contained in the ConversationEntries? 


                ConversationEntries.instance().getConversationEntries()
                



                Its a Collection<ConversationEntry> that you can try printing out.  If that doesn't have any contents in it, then likely you are seeing the same kind of problems we encountered.  I believe these are fixed in Seam 2.  If you're just doing debug stuff, there are other ways to fetch that debug data using the manual lookups described in this thread.


                Good luck, Michael!

                • 7. Re: Conversation.instance().isLongRunning() - NullPointerException
                  Michael Kelly Newbie

                  Hi Keith,
                    the collection did actually have one item...



                  15:34:53,843 DEBUG [EditRoutingPlanBean] Conversation id 7
                  15:34:53,843 DEBUG [EditRoutingPlanBean] Entry 6
                  15:34:53,843 DEBUG [EditRoutingPlanBean] Conversation Entry null
                  



                  Unfortunately I'm not just doing debug - I need to be able to tell if the conversation is long running - if it isn't then I want to redirect the user to a specific landing page.  Can you think of any other way for me to determine if the conversation is long running??


                  Many thanks
                  Mike


                  public void load() {
                      try {
                       log.debug( "Conversation id #0", Conversation.instance().getId() );
                       for( ConversationEntry e :  ConversationEntries.instance().getConversationEntries() ) {
                           log.debug( "Entry #0", e.getId() );
                          }
                          ConversationEntry ce = ConversationEntries.instance().getConversationEntry(Conversation.instance().getId());
                       log.debug( "Conversation Entry #0", ce );
                        
                       if (id != null) {
                           routingPlan = RoutingPlanBuilder.buildPlan(routingPlanService.findByUid(id));                   Conversation.instance().begin();
                           valid = RoutingPlanBuilder.validate(routingPlan);
                           selectedId = null;
                                      
                       } else if (!Conversation.instance().isLongRunning()) {
                              Redirect.instance().setViewId( "/provisioning_home.xhtml" );
                           Redirect.instance().execute();                         }
                      } catch( RoutingPlanNotFoundException rpnfe ) {
                          Redirect.instance().setViewId( "/provisioning_home.xhtml" );
                          Redirect.instance().execute();                         
                      }          
                  }


                  • 8. Re: Conversation.instance().isLongRunning() - NullPointerException
                    Keith Naas Novice

                    Could you remove the else if (....isLongRunning()) and do the redirect in a pages.xml navigation rule instead?


                    I would also recommend doing that for the exception handling where the redirct occurs.  If you do need to do some logic, try using outcomes so that the view filenames aren't scattered throughout the java code.  It will be a lot easier to reorganize the locations of the view files if you ever need to do so :)


                    • 9. Re: Conversation.instance().isLongRunning() - NullPointerException
                      Michael Kelly Newbie

                      Hi Keith,
                        I absolutely agree with your comments - its best to so things like this in pages.xml.  Unfortunately in this circumstance we can't put no-conversation-view-id="/provisioning_home.xhtml"
                      in pages.xml - the conversation starting is dependent on whether or not an id has been passed in as a request parameter i.e.



                      if (id != null) {
                          routingPlan =   RoutingPlanBuilder.buildPlan(routingPlanService.findByUid(id));
                          Conversation.instance().begin();
                          valid = RoutingPlanBuilder.validate(routingPlan);
                          selectedId = null;
                      }




                      The code checks to see if an id has been specified.  If so it starts the conversation.
                      However, using no-conversation-view-id would cause the redirect to happen before we know whether or not this is what we want.


                      Hope that makes sense
                      Cheers
                      Mike

                      • 10. Re: Conversation.instance().isLongRunning() - NullPointerException
                        Michael Kelly Newbie

                        mmm, I've upgraded to Seam 2.0.1GA and although the stack trace no longer mentions a nullpointerexception in Manager, it does still throw the following stack trace :


                        Any help would be greatly appreciated.


                        13:25:40,438 WARN  [lifecycle] admin phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1beaa92) threw exception: java.lang.NullPointerException null
                        org.ajax4jsf.context.AjaxContextImpl.saveViewState(AjaxContextImpl.java:497)
                        org.ajax4jsf.event.AjaxPhaseListener.afterPhase(AjaxPhaseListener.java:81)
                        com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
                        com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                        javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                        org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                        org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                        org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                        org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                        org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                        org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                        org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                        org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                        java.lang.Thread.run(Thread.java:595)


                        • 11. Re: Conversation.instance().isLongRunning() - NullPointerException
                          Pete Muir Master

                          Unless you trimmed the stack trace, I don't this is related to Seam.

                          • 12. Re: Conversation.instance().isLongRunning() - NullPointerException
                            Karl Traunmüller Newbie

                            We've been experiencing the same problem (Seam 2.0.1.GA, RichFaces 3.1.4.GA, JBoss 4.2.2.GA)



                            Caused by: java.lang.NullPointerException
                                 at org.jboss.seam.core.Manager.isReallyLongRunningConversation(Manager.java:230)
                                 at org.jboss.seam.core.Conversation.isLongRunning(Conversation.java:308)
                                 at at.ooev.titan.action.seam.SeamTracerBean.getConversationInfo(SeamTracerBean.java:24)
                                 at at.ooev.titan.action.seam.SeamTracerBean.conversationEnd(SeamTracerBean.java:38)
                                 at sun.reflect.GeneratedMethodAccessor958.invoke(Unknown Source)



                            until I realized that we were calling Conversation.instance().isLongRunning() (and in turn getCurrentConversationEntry().isRemoveAfterRedirect()) from a org.jboss.seam.endConversation observer (see above stack trace). So the problem was on our side.


                            regards,
                            Karl