ODE
  1. ODE
  2. ODE-223

BPEL process using bpws:doXslTransform(...) crash at tomcat restart

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 1.2
    • Component/s: BPEL Runtime
    • Labels:
      None
    • Environment:
      OS : Mac OS/X 10.4
      Tomcat 5.5

      Description

      mosser@asmodeus:~/TvShowsOrchestration$ tomcat.sh stop
      ... bla bla bla ...
      16:56:06,224 INFO [BpelServerImpl] BPEL Server Stopped.
      16:56:06,225 INFO [ODEServer] Shutdown completed.
      ... bla bla bla ...
      mosser@asmodeus:~/TvShowsOrchestration$ tomcat.sh start
      ... bla bla bla ...
      16:56:53,337 INFO [ODEServer] Using DAO Connection Factory class org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl.
      16:56:54,328 INFO [BpelServerImpl] BPEL Server Started.
      16:56:56,819 INFO [BpelServerImpl] Registered process

      {http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/tv}

      OnTvTonight-10.
      16:56:56,871 INFO [DeploymentPoller] Poller started.
      16:56:56,871 INFO [ODEServer] Process deployment polling started on path /opt/tomcat/webapps/ode/WEB-INF/processes.
      16:56:56,876 INFO [ODEServer] ODE Service Engine has been started.
      ... bla bla bla ...

      As far as we are, there is no trouble. Nos, let's try to invoke the process (each process using xsl stylesheet has the same weird behaviour) (invoke.sh is basically a 'curl | xmllint --format -' script)

      mosser@asmodeus:~/TvShowsOrchestration$ invoke.sh http://localhost:8080/ode/processes/TvShowsOrchestrations/process
      ERROR - GeronimoLog.error(108) | Scheduled job failed; jobDetail=

      {type=INVOKE_RESPONSE, inmem=true, mexid=4611686018427387905, channel=31, iid=0}

      java.lang.RuntimeException: java.lang.NullPointerException
      at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:464)
      at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
      at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:913)
      at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:392)
      at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:328)
      at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:373)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:341)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:340)
      at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:179)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:339)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:336)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:613)
      Caused by: java.lang.NullPointerException
      at org.apache.ode.utils.xsl.XslTransformHandler.parseXSLSheet(XslTransformHandler.java:84)
      at org.apache.ode.utils.xsl.XslTransformHandler.cacheXSLSheet(XslTransformHandler.java:106)
      at org.apache.ode.bpel.elang.xpath10.runtime.JaxenContexts$DoXslTransformFunction.call(JaxenContexts.java:367)
      at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:186)
      at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:112)
      at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:688)
      at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:227)
      at org.apache.ode.bpel.elang.xpath10.runtime.XPath10ExpressionRuntime.evaluate(XPath10ExpressionRuntime.java:98)
      at org.apache.ode.bpel.runtime.ExpressionLanguageRuntimeRegistry.evaluate(ExpressionLanguageRuntimeRegistry.java:80)
      at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:196)
      at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:362)
      at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:79)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
      ... 15 more

      Ouch ... it seems that my XSL stylesheet does not work ... BUT ...
      let's redeploy the process :

      mosser@asmodeus:~/TvShowsOrchestration$ ant deploy
      Buildfile: build.xml
      compile:

      deploy:
      [copy] Copying 1 file to /opt/tomcat/webapps/ode/WEB-INF/processes/TvShowsOrchestrations
      [copy] Copying /Users/mosser/workspaces/seduite/TvShowsOrchestration/OnTvTonight.cbp to /opt/tomcat/webapps/ode/WEB-INF/processes/TvShowsOrchestrations/OnTvTonight.cbp

      reload:
      [delete] Deleting /opt/tomcat/webapps/ode/WEB-INF/processes/TvShowsOrchestrations.deployed

      BUILD SUCCESSFUL
      Total time: 2 seconds

      Tomcat logs :
      17:01:30,054 INFO [BpelServerImpl] Unregistered process

      {http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/tv}

      OnTvTonight-10.
      17:01:30,829 INFO [BpelServerImpl] Registered process

      {http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/tv}

      OnTvTonight-11.
      17:01:30,829 INFO [DeploymentPoller] Deployment of artifact TvShowsOrchestrations successful: [

      {http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/tv}

      OnTvTonight-11]

      And now, let's invoke again :
      mosser@asmodeus:~/TvShowsOrchestration$ invoke.sh http://localhost:8080/ode/processes/TvShowsOrchestrations/process % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
      100 3444 0 3444 0 0 4656 0 -::- -::- -::- 0
      <?xml version="1.0"?>
      <axis2ns7:OnTvTonightResponse xmlns:axis2ns7="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/tv" xmlns:tns="http://rainbow.i3s.unice.fr/mosser/jSeduite/orchestrations/tv">
      <tns:shows>
      <tns:show>
      <tns:channel>Star academy </tns:channel>
      <tns:startAt> 20:50</tns:startAt>
      <tns:showTitle/>
      </tns:show>
      <!-- others french tv shows goes here ... -->
      </tns:shows>
      </axis2ns7:OnTvTonightResponse>

      So : MY STYLESHEET works ! Let's restart tomcat :
      mosser@asmodeus:~/TvShowsOrchestration$ tomcat.sh restart
      mosser@asmodeus:~/TvShowsOrchestration$ invoke.sh http://localhost:8080/ode/processes/TvShowsOrchestrations/process

      And ... null pointer exception again ...

      1. ODE-223.patch
        1 kB
        Alexey Ousov

        Activity

        Hide
        Matthieu Riou added a comment -

        I can't reproduce this using our XSL test located at http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/

        What I've done is:

        1. Deploy the test in Tomcat
        2. Invoke it -> works
        3. Stop Tomcat
        4. Restart Tomcat
        5. Invoke it -> works

        Did I miss something?

        Show
        Matthieu Riou added a comment - I can't reproduce this using our XSL test located at http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/ What I've done is: 1. Deploy the test in Tomcat 2. Invoke it -> works 3. Stop Tomcat 4. Restart Tomcat 5. Invoke it -> works Did I miss something?
        Hide
        Sebastian Mosser added a comment - - edited

        Using Tomcat 5.5 & Ode 1.1.1RC1.

          1. 1. Retrieving test files :

        mosser@asmodeus:~$ mkdir TMP
        mosser@asmodeus:~$ cd TMP/
        mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/HelloXslWorld.bpel
        mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/HelloXslWorld.wsdl
        mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/HelloXslWorld.xsl
        mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/deploy.xml
        mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/test.properties

          1. 2. Deploying process

        mosser@asmodeus:~/TMP$ cp -rf . /opt/tomcat/webapps/ode/WEB-INF/processes/Hello
        ==> Tomcat Logs :
        21:40:51,371 INFO [BpelServerImpl] Registered process

        {http://ode/bpel/unit-test}

        HelloXslWorld-21.
        21:40:51,393 INFO [DeploymentPoller] Deployment of artifact Hello successful: [

        {http://ode/bpel/unit-test}

        HelloXslWorld-21]

          1. Invoking :

        mosser@asmodeus:~/TMP$ curl http://localhost:8080/ode/processes/helloXslWorld/helloXsl?TestPart=bla | xmllint --format -
        % Total % Received % Xferd Average Speed Time Time Time Current
        Dload Upload Total Spent Left Speed
        100 258 0 258 0 0 1190 0 -::- -::- -::- 0
        <?xml version="1.0"?>
        <axis2ns53:helloXslResponse xmlns:axis2ns53="http://ode/bpel/unit-test.wsdl">
        <TestPart xmlns:axis2ns52="http://ode/bpel/unit-test.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <hello>Xsl World</hello>
        </TestPart>
        </axis2ns53:helloXslResponse>

          1. Tomcat stop, and the start :
            mosser@asmodeus:~/TMP$ /opt/tomcat/bin/shutdown.sh
            mosser@asmodeus:~/TMP$ /opt/tomcat/bin/startup.sh
          1. Invocation : mosser@asmodeus:~/TMP$ curl http://localhost:8080/ode/processes/helloXslWorld/helloXsl?TestPart=bla | xmllint --format -
            % Total % Received % Xferd Average Speed Time Time Time Current
            Dload Upload Total Spent Left Speed
            100 254 0 254 0 0 261 0 -::- -::- -::- 0
            <?xml version="1.0"?>
            <axis2ns2:helloXslResponse xmlns:axis2ns2="http://ode/bpel/unit-test.wsdl">
            <TestPart xmlns:axis2ns1="http://ode/bpel/unit-test.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
            <hello>Xsl World</hello>
            </TestPart>
            </axis2ns2:helloXslResponse>

        But, in tomcat logs :
        ERROR - GeronimoLog.error(108) | XSL stylesheet parsing error!
        javax.xml.transform.TransformerException: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
        at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(PreparedStylesheet.java:283)
        at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:127)
        at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:135)
        at org.apache.ode.utils.xsl.XslTransformHandler.parseXSLSheet(XslTransformHandler.java:85)
        at org.apache.ode.utils.xsl.XslTransformHandler.cacheXSLSheet(XslTransformHandler.java:106)
        at org.apache.ode.bpel.elang.xpath20.runtime.JaxpFunctionResolver$DoXslTransform.evaluate(JaxpFunctionResolver.java:257)
        at net.sf.saxon.xpath.XPathFunctionCall.call(XPathFunctionCall.java:95)
        at net.sf.saxon.xpath.XPathFunctionCall.iterate(XPathFunctionCall.java:78)
        at net.sf.saxon.xpath.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:256)
        at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:179)
        at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:97)
        at org.apache.ode.bpel.runtime.ExpressionLanguageRuntimeRegistry.evaluate(ExpressionLanguageRuntimeRegistry.java:80)
        at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:196)
        at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:362)
        at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:79)
        at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
        at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
        at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:913)
        at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:197)
        at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:194)
        at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:362)
        at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:328)
        at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:373)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:341)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:340)
        at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:179)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:339)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:336)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:613)
        21:43:55,595 ERROR [XslCompilationErrorListener] XSL stylesheet parsing error!
        javax.xml.transform.TransformerException: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
        at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(PreparedStylesheet.java:283)
        at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:127)
        at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:135)
        at org.apache.ode.utils.xsl.XslTransformHandler.parseXSLSheet(XslTransformHandler.java:85)
        at org.apache.ode.utils.xsl.XslTransformHandler.cacheXSLSheet(XslTransformHandler.java:106)
        at org.apache.ode.bpel.elang.xpath20.runtime.JaxpFunctionResolver$DoXslTransform.evaluate(JaxpFunctionResolver.java:257)
        at net.sf.saxon.xpath.XPathFunctionCall.call(XPathFunctionCall.java:95)
        at net.sf.saxon.xpath.XPathFunctionCall.iterate(XPathFunctionCall.java:78)
        at net.sf.saxon.xpath.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:256)
        at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:179)
        at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:97)
        at org.apache.ode.bpel.runtime.ExpressionLanguageRuntimeRegistry.evaluate(ExpressionLanguageRuntimeRegistry.java:80)
        at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:196)
        at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:362)
        at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:79)
        at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
        at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
        at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:913)
        at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:197)
        at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:194)
        at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:362)
        at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:328)
        at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:373)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:341)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:340)
        at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:179)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:339)
        at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:336)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:613)

          1. Force deployment :
            mosser@asmodeus:~/TMP$ rm /opt/tomcat/webapps/ode/WEB-INF/processes/Hello.deployed
          1. Invoke :
            mosser@asmodeus:~/TMP$ curl http://localhost:8080/ode/processes/helloXslWorld/helloXsl?TestPart=bla | xmllint --format -
            % Total % Received % Xferd Average Speed Time Time Time Current
            Dload Upload Total Spent Left Speed
            100 254 0 254 0 0 272 0 -::- -::- -::- 0
            <?xml version="1.0"?>
            <axis2ns2:helloXslResponse xmlns:axis2ns2="http://ode/bpel/unit-test.wsdl">
            <TestPart xmlns:axis2ns1="http://ode/bpel/unit-test.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
            <hello>Xsl World</hello>
            </TestPart>
            </axis2ns2:helloXslResponse>

        But nothing in Tomcat logs

        Show
        Sebastian Mosser added a comment - - edited Using Tomcat 5.5 & Ode 1.1.1RC1. 1. Retrieving test files : mosser@asmodeus:~$ mkdir TMP mosser@asmodeus:~$ cd TMP/ mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/HelloXslWorld.bpel mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/HelloXslWorld.wsdl mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/HelloXslWorld.xsl mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/deploy.xml mosser@asmodeus:~/TMP$ wget http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.1/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/test.properties 2. Deploying process mosser@asmodeus:~/TMP$ cp -rf . /opt/tomcat/webapps/ode/WEB-INF/processes/Hello ==> Tomcat Logs : 21:40:51,371 INFO [BpelServerImpl] Registered process {http://ode/bpel/unit-test} HelloXslWorld-21. 21:40:51,393 INFO [DeploymentPoller] Deployment of artifact Hello successful: [ {http://ode/bpel/unit-test} HelloXslWorld-21] Invoking : mosser@asmodeus:~/TMP$ curl http://localhost:8080/ode/processes/helloXslWorld/helloXsl?TestPart=bla | xmllint --format - % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 258 0 258 0 0 1190 0 - : : - - : : - - : : - 0 <?xml version="1.0"?> <axis2ns53:helloXslResponse xmlns:axis2ns53="http://ode/bpel/unit-test.wsdl"> <TestPart xmlns:axis2ns52="http://ode/bpel/unit-test.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <hello>Xsl World</hello> </TestPart> </axis2ns53:helloXslResponse> Tomcat stop, and the start : mosser@asmodeus:~/TMP$ /opt/tomcat/bin/shutdown.sh mosser@asmodeus:~/TMP$ /opt/tomcat/bin/startup.sh Invocation : mosser@asmodeus:~/TMP$ curl http://localhost:8080/ode/processes/helloXslWorld/helloXsl?TestPart=bla | xmllint --format - % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 254 0 254 0 0 261 0 - : : - - : : - - : : - 0 <?xml version="1.0"?> <axis2ns2:helloXslResponse xmlns:axis2ns2="http://ode/bpel/unit-test.wsdl"> <TestPart xmlns:axis2ns1="http://ode/bpel/unit-test.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <hello>Xsl World</hello> </TestPart> </axis2ns2:helloXslResponse> But, in tomcat logs : ERROR - GeronimoLog.error(108) | XSL stylesheet parsing error! javax.xml.transform.TransformerException: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(PreparedStylesheet.java:283) at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:127) at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:135) at org.apache.ode.utils.xsl.XslTransformHandler.parseXSLSheet(XslTransformHandler.java:85) at org.apache.ode.utils.xsl.XslTransformHandler.cacheXSLSheet(XslTransformHandler.java:106) at org.apache.ode.bpel.elang.xpath20.runtime.JaxpFunctionResolver$DoXslTransform.evaluate(JaxpFunctionResolver.java:257) at net.sf.saxon.xpath.XPathFunctionCall.call(XPathFunctionCall.java:95) at net.sf.saxon.xpath.XPathFunctionCall.iterate(XPathFunctionCall.java:78) at net.sf.saxon.xpath.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:256) at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:179) at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:97) at org.apache.ode.bpel.runtime.ExpressionLanguageRuntimeRegistry.evaluate(ExpressionLanguageRuntimeRegistry.java:80) at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:196) at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:362) at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:79) at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451) at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139) at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:913) at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:197) at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:194) at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:362) at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:328) at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:373) at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:341) at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:340) at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:179) at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:339) at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:336) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:613) 21:43:55,595 ERROR [XslCompilationErrorListener] XSL stylesheet parsing error! javax.xml.transform.TransformerException: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor at net.sf.saxon.PreparedStylesheet.setStylesheetDocument(PreparedStylesheet.java:283) at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:127) at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:135) at org.apache.ode.utils.xsl.XslTransformHandler.parseXSLSheet(XslTransformHandler.java:85) at org.apache.ode.utils.xsl.XslTransformHandler.cacheXSLSheet(XslTransformHandler.java:106) at org.apache.ode.bpel.elang.xpath20.runtime.JaxpFunctionResolver$DoXslTransform.evaluate(JaxpFunctionResolver.java:257) at net.sf.saxon.xpath.XPathFunctionCall.call(XPathFunctionCall.java:95) at net.sf.saxon.xpath.XPathFunctionCall.iterate(XPathFunctionCall.java:78) at net.sf.saxon.xpath.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:256) at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:179) at org.apache.ode.bpel.elang.xpath20.runtime.XPath20ExpressionRuntime.evaluate(XPath20ExpressionRuntime.java:97) at org.apache.ode.bpel.runtime.ExpressionLanguageRuntimeRegistry.evaluate(ExpressionLanguageRuntimeRegistry.java:80) at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:196) at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:362) at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:79) at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451) at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139) at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:913) at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:197) at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:194) at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:362) at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:328) at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:373) at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:341) at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:340) at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:179) at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:339) at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:336) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:613) Force deployment : mosser@asmodeus:~/TMP$ rm /opt/tomcat/webapps/ode/WEB-INF/processes/Hello.deployed Invoke : mosser@asmodeus:~/TMP$ curl http://localhost:8080/ode/processes/helloXslWorld/helloXsl?TestPart=bla | xmllint --format - % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 254 0 254 0 0 272 0 - : : - - : : - - : : - 0 <?xml version="1.0"?> <axis2ns2:helloXslResponse xmlns:axis2ns2="http://ode/bpel/unit-test.wsdl"> <TestPart xmlns:axis2ns1="http://ode/bpel/unit-test.wsdl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <hello>Xsl World</hello> </TestPart> </axis2ns2:helloXslResponse> But nothing in Tomcat logs
        Hide
        Matthieu Riou added a comment -

        That's very weird. First, Saxon shouldn't throw an exception because of the version of the XSL stylesheet, at worst it should just give a warning or info. I don't have this no matter how many times I restart Tomcat without redeploying or anything. I'm leaning toward something specific to your environment. Do you have another version of Saxon somewhere in your Tomcat installation?

        Show
        Matthieu Riou added a comment - That's very weird. First, Saxon shouldn't throw an exception because of the version of the XSL stylesheet, at worst it should just give a warning or info. I don't have this no matter how many times I restart Tomcat without redeploying or anything. I'm leaning toward something specific to your environment. Do you have another version of Saxon somewhere in your Tomcat installation?
        Hide
        Sebastian Mosser added a comment -

        At all, no other version of Saxon (I've never heard that name !).

        If it's specific to my environment, it's not a problem, I've just added a rm -rf *.deployed at tomcat startup. But it's ... weird.

        Show
        Sebastian Mosser added a comment - At all, no other version of Saxon (I've never heard that name !). If it's specific to my environment, it's not a problem, I've just added a rm -rf *.deployed at tomcat startup. But it's ... weird.
        Hide
        Alexey Ousov added a comment -

        Successfully reproduced this issue on current snapshot of 1.1 branch. The following conditions should be met to reproduce: process should use xpath 1.0 and after deploying server should be restarted.

        It happens because org.apache.ode.utils.xsl.XslTransformHandler is not initialized properly when class org.apache.ode.bpel.elang.xpath10.runtime.XPath10ExpressionRuntime is created (but other classes initialize it: XPath20ExpressionRuntime, XPath10ExpressionCompilerBPEL20 and XPath20ExpressionCompilerImpl).

        Anyway, it is very very bad idea to initialize signelton class (XslTransformHandler is singelton) from non-singelton classes as manu times as they are created.

        Show
        Alexey Ousov added a comment - Successfully reproduced this issue on current snapshot of 1.1 branch. The following conditions should be met to reproduce: process should use xpath 1.0 and after deploying server should be restarted. It happens because org.apache.ode.utils.xsl.XslTransformHandler is not initialized properly when class org.apache.ode.bpel.elang.xpath10.runtime.XPath10ExpressionRuntime is created (but other classes initialize it: XPath20ExpressionRuntime, XPath10ExpressionCompilerBPEL20 and XPath20ExpressionCompilerImpl). Anyway, it is very very bad idea to initialize signelton class (XslTransformHandler is singelton) from non-singelton classes as manu times as they are created.
        Hide
        Alexey Ousov added a comment -

        Patch is intended to fix issue for 1.1 branch. But I'd recommend some refactoring in this place.

        Show
        Alexey Ousov added a comment - Patch is intended to fix issue for 1.1 branch. But I'd recommend some refactoring in this place.
        Hide
        Matthieu Riou added a comment -

        Fixed

        Show
        Matthieu Riou added a comment - Fixed

          People

          • Assignee:
            Matthieu Riou
            Reporter:
            Sebastian Mosser
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development