4 Replies Latest reply on Mar 5, 2007 6:03 PM by Alejandro Guizar

    Best way to debug my BPEL processes in JBPM?

    Meghana Joglekar Novice

      Hello,

      I have deployed my BPEL process calling external webservice successfully. Now I am sending SOAP request to it using SOAP UI. I get this message on the console -

      11:50:08,182 INFO [ServiceEndpointManager] WebService started: http://HQ02022:8
      080/NewHire/newhire
      12:16:30,891 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.d
      ef.CompositeActivity - this operation breaks ==
      


      and exception in the server.log
      2007-03-05 12:17:23,978 DEBUG [org.jbpm.bpel.graph.scope.FaultActionHandler] handling fault: org.jbpm.bpel.graph.exe.ScopeInstance@1641f43[name=<null>,token=/,state=performingPrimaryActivity,id=0]
      org.jbpm.bpel.graph.exe.BpelFaultException: org.jbpm.bpel.graph.exe.FaultInstance@7f923d[name={http://schemas.xmlsoap.org/ws/2004/03/business-process/}selectionFailure,id=0]
       at org.jbpm.bpel.sublang.xpath.XPathEvaluator.getSingleNode(XPathEvaluator.java:175)
       at org.jbpm.bpel.sublang.xpath.XPathQueryEvaluator.evaluate(XPathQueryEvaluator.java:57)
       at org.jbpm.bpel.graph.basic.assign.FromVariable.extract(FromVariable.java:57)
      


      From the error message it is clear that it cannot find node at some xpath or finds multiple nodes. But it does not print the 'assign' node index or xpath. Most probably it has failed in very first xpath but going forward what is the best way to debug what went wrong?

      The only way I can think of right now is to build jbpm-bpel locally. If I want to debug the source code, which port of 'localhost' I should attach the eclipse debugger with?

      Thank you,
      Meghana

        • 1. Re: Best way to debug my BPEL processes in JBPM?
          Meghana Joglekar Novice

          Hello All,

          I tried following the settings on http://www.jboss.com/products/jbpm/downloads to get source code from cvs and I get 'connection refused' error :(

          D:\jbpm-bpel-trunk>cvs -d :pserver:anonymous@anoncvs.forge.jboss.com:/cvsroot/jb
          pm checkout /
          cvs [checkout aborted]: connect to anoncvs.forge.jboss.com(64.74.196.143):2401 f
          ailed: Connection refused
          


          Any idea?

          Meghana

          • 2. Re: Best way to debug my BPEL processes in JBPM?
            Alejandro Guizar Master

            You can read about the ProxyWarnLog here. Searching the word "ProxyWarnLog" in this forum should also give you the details you need.

            what is the best way to debug what went wrong?

            Try not to rely to much on a debugger. Personally, I did; after a while I found it took too much time to find even the simplest problems. Now I prefer to examine the log file. The problem with logs is that they tend to have an overwhelming amount of useless information. Fortunately, it can be filtered :-)

            JBoss AS uses log4j as its logging kit. The configuration file resides in server/[profile]/conf/log4j.xml. The log4j manual provides a great description of the configuration file format.

            Hibernate can be quite verbose, in typical debug sessions I limit everything but the SQL statements:
            <!-- Limit the org.hibernate category to INFO as its DEBUG is verbose -->
             <category name="org.hibernate">
             <priority value="INFO"/>
             </category>
             <!-- Limit the SQL statements -->
             <category name="org.hibernate.SQL">
             <priority value="DEBUG"/>
             </category>
             <category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog">
             <priority value="ERROR"/>
             </category>

            Note, the above also takes care of the annoying ProxyWarnLog entries popping up in the console.

            jBPM emits log messages on any process execution event:
            15:49:28,765 DEBUG GraphElement : event 'node-leave' on 'Receive(A)' for 'Token(/primary/S)'
            15:49:28,765 DEBUG GraphElement : event 'transition' on 'Transition(A-StructuredActivity.End)' for 'Token(/primary/S)'
            15:49:28,765 DEBUG GraphElement : event 'node-enter' on 'Receive(B)' for 'Token(/primary/S)'

            In the above extract, "A" and "B" are the activity names. By looking at nearby GraphElement entries, you can determine the activity where the fault occurred.

            This information also goes to the database so that you can access it programmatically. Refer to the chapter on logging in the jBPM user guide for details.

            If I want to debug the source code, which port of 'localhost' I should attach the eclipse debugger with?

            JBoss AS does not start the JVM in debug mode by default. If you want to do so and you are running on Windows, edit bin/run.bat. Look for "JPDA options", then uncomment the following line:
            rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%

            The port will be 8787.

            • 3. Re: Best way to debug my BPEL processes in JBPM?
              Meghana Joglekar Novice

              Hello Alex,

              Thank you for the prompt reply. Looking at the server log file I was thinking of changing log4j anyway. Btw what about that cvs error? It has been a while since I used cvs ...so is there anything wrong with my command? Why am I not able to get the source?

              Thank you,
              Meghana

              • 4. Re: Best way to debug my BPEL processes in JBPM?
                Alejandro Guizar Master

                I tried and it worked for me

                C:\dev\jbpm\anoncvs>cvs -d :pserver:anonymous@anoncvs.forge.jboss.com:/cvsroot/jbpm checkout jbpm.3/bpel
                cvs checkout: cwd=C:\dev\jbpm\anoncvs ,current=C:\dev\jbpm\anoncvs
                cvs checkout: Updating jbpm.3/bpel
                U jbpm.3/bpel/.classpath
                U jbpm.3/bpel/.project