5 Replies Latest reply on May 29, 2006 12:01 PM by Gavin King

    jBPM and Exception problem

    drapierwimATgmailDOTcom Newbie

      I have a SFSB method that is a part of my jBPM pageflow, when the UnValidBookingExeption is thrown i get an error, what is wrong here?

      public void addBooking() {
       if(transaction == null)
       createTransaction();
       try {
       transaction.add(booking);
       bookings = transaction.getBookings();
       } catch (UnValidBookingException e) {
       facesMessages.add(FacesMessage.SEVERITY_WARN,"#{messages['missing.account']}");
       } catch (ImmutableTransactionException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       }
      


      The error


      2006-05-28 18:31:47,442 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
      2006-05-28 18:32:23,193 DEBUG [org.jboss.seam.interceptors.RemoveInterceptor] Stateful component was removed: journalPost
      2006-05-28 18:32:23,203 ERROR [org.jbpm.graph.def.GraphElement] action threw exception: couldn't evaluate expression '#{journalPost.addBooking}'
      org.jbpm.JbpmException: couldn't evaluate expression '#{journalPost.addBooking}'
       at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:37)
       at org.jbpm.graph.def.Action.execute(Action.java:119)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
       at org.jbpm.graph.def.Transition.take(Transition.java:106)
       at org.jbpm.graph.def.Node.leave(Node.java:382)
       at org.jbpm.graph.exe.Token.signal(Token.java:174)
       at org.jbpm.graph.exe.Token.signal(Token.java:137)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:229)
       at org.jboss.seam.core.Pageflow.navigate(Pageflow.java:183)
       at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:31)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
       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.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:432)
       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)
      Caused by: org.jbpm.jpdl.el.ELException: An error occurred while invoking method "addBooking" on an instance of class $Proxy163
       at org.jbpm.jpdl.el.impl.Logger.logError(Logger.java:485)
       at org.jbpm.jpdl.el.impl.Logger.logError(Logger.java:589)
       at org.jbpm.jpdl.el.impl.ArraySuffix.evaluate(ArraySuffix.java:290)
       at org.jbpm.jpdl.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
       at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:264)
       at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:191)
       at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:34)
       ... 44 more
      2006-05-28 18:32:23,203 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
       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.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:432)
       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)
      2006-05-28 18:32:23,233 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-05-28 18:32:23,233 INFO [org.jboss.seam.servlet.SeamExceptionFilter] killing transaction
      2006-05-28 18:32:23,233 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-05-28 18:32:23,233 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
      2006-05-28 18:32:23,233 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
      2006-05-28 18:32:23,233 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
      2006-05-28 18:32:23,233 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts
      2006-05-28 18:32:23,233 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
      2006-05-28 18:32:23,233 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
      2006-05-28 18:32:23,233 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
      2006-05-28 18:32:23,233 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
      2006-05-28 18:32:23,233 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/fisconet].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:349)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:248)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
       at org.jbpm.graph.def.Transition.take(Transition.java:106)
       at org.jbpm.graph.def.Node.leave(Node.java:382)
       at org.jbpm.graph.exe.Token.signal(Token.java:174)
       at org.jbpm.graph.exe.Token.signal(Token.java:137)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:229)
       at org.jboss.seam.core.Pageflow.navigate(Pageflow.java:183)
       at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:31)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
       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.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:432)
       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)
      Caused by: org.jbpm.JbpmException: couldn't evaluate expression '#{journalPost.addBooking}'
       at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:37)
       at org.jbpm.graph.def.Action.execute(Action.java:119)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
       ... 42 more
      Caused by: org.jbpm.jpdl.el.ELException: An error occurred while invoking method "addBooking" on an instance of class $Proxy163
       at org.jbpm.jpdl.el.impl.Logger.logError(Logger.java:485)
       at org.jbpm.jpdl.el.impl.Logger.logError(Logger.java:589)
       at org.jbpm.jpdl.el.impl.ArraySuffix.evaluate(ArraySuffix.java:290)
       at org.jbpm.jpdl.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
       at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:264)
       at org.jbpm.jpdl.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:191)
       at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:34)
       ... 44 more
      


        • 1. Re: jBPM and Exception problem
          Gavin King Master

          Looks like jBPM is being naughty and swallowing the underlying exception. Bad jBPM!

          What version of jBPM is this?

          But a breakpoint in addBooking() and find the real exception.

          • 2. Re: jBPM and Exception problem
            Tom Baeyens Master

            seems that this is a problem copied from el: the root cause is a special member instead of using the exception cause.

            public class ELException
             extends Exception
            {
             private static final long serialVersionUID = 1L;
            
             //-------------------------------------
             // Member variables
             //-------------------------------------
            
             private Throwable mRootCause;
            
             //-------------------------------------
             /**
             * Creates an ELException with no detail message.
             **/
             public ELException ()
             {
             super ();
             }
            
             //-------------------------------------
             /**
             * Creates an ELException with the provided detail message.
             *
             * @param pMessage the detail message
             **/
             public ELException (String pMessage)
             {
             super (pMessage);
             }
            
             //-------------------------------------
             /**
             * Creates an ELException with the given root cause.
             *
             * @param pRootCause the originating cause of this exception
             **/
             public ELException (Throwable pRootCause)
             {
             super( pRootCause.getLocalizedMessage() );
             mRootCause = pRootCause;
             }
            
             //-------------------------------------
             /**
             * Creates an ELException with the given detail message and root cause.
             *
             * @param pMessage the detail message
             * @param pRootCause the originating cause of this exception
             **/
             public ELException (String pMessage,
             Throwable pRootCause)
             {
             super (pMessage);
             mRootCause = pRootCause;
             }
            
             //-------------------------------------
             /**
             * Returns the root cause.
             *
             * @return the root cause of this exception
             */
             public Throwable getRootCause ()
             {
             return mRootCause;
             }
            }
            




            • 3. Re: jBPM and Exception problem
              drapierwimATgmailDOTcom Newbie

               

              "gavin.king@jboss.com" wrote:
              Looks like jBPM is being naughty and swallowing the underlying exception. Bad jBPM!

              What version of jBPM is this?

              But a breakpoint in addBooking() and find the real exception.


              Ok something wierd happend here, i've restarted my AS marked my method with a breakpoint and started debugging... result everything worked well.

              The only thing I've done was making the transaction(entity) class a non seam component again, don't know if that was the problem. I will surely test this again later on, Thanks

              • 4. Re: jBPM and Exception problem
                Tom Baeyens Master

                created jira issue http://jira.jboss.com/jira/browse/JBPM-666 to fix the hiding if the original cause.

                • 5. Re: jBPM and Exception problem
                  Gavin King Master

                  Aaaiiieeee, the issue of The Beast!