5 Replies Latest reply on May 25, 2006 11:43 AM by Gavin King

    NullPointerException when processing parallel Requests

    Stefan Craatz Newbie

      Hi,

      we are trying to start a new Conversation in a new window throu a Javascript function that is attached to an h:commandButton. When the button is clicked Seam throws a NullPointException in the new window. The window that executes the Javascript code is not part of any Seam conversation.

      Here is the log of the Exception thrown:

      2006-05-25 12:34:55,406 ERROR [STDERR] 25.05.2006 12:34:55 com.sun.facelets.FaceletViewHandler handleRenderException
      SCHWERWIEGEND: Error Rendering View[/buchung/buchung.xhtml]
      java.lang.NullPointerException
       at org.jboss.seam.core.Manager.touchConversationStack(Manager.java:147)
       at org.jboss.seam.core.Manager.storeConversation(Manager.java:322)
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.storeAnyConversationContext(AbstractSeamPhaseListener.java:69)
       at org.jboss.seam.jsf.SeamStateManager.saveSerializedView(SeamStateManager.java:45)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
       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 de.comitatus.web.resource.ResourceFilter.doFilter(ResourceFilter.java:51)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at de.comitatus.web.resource.ResourceFilter.doFilter(ResourceFilter.java:76)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
       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.processConnection(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)
      
      


      This is the Javascript code opening the new window:

      function buchungEdit (bucId) {
      var url_base = location.protocol + "//" + location.host + "/lisa";
      var url = url_base + "/webapp/facelet/buchung/buchung.jsf?actionMethod=buchungsmaschine.beginBuchung&conversationPropagation=begin&bucId=" + bucId;
      var options = "directories=no,location=no,menubar=no,toolbar=no,height=600,width=900,resizable=yes,scrollbars=yes,status=yes";
      window.open(url, "", options);
      return true;
      }
      


      When I insert an alert() after the window.open() command to stop the form submit everything works fine. Therefore I suppose that somehow the two parallel requests cause trouble.
      Using an s:link works, but we need the event from the button to do some further processing.

      Is there a way around this?

      Thanks
      Stefan