Uploaded image for project: 'ODE'
  1. ODE
  2. ODE-536

NullPointerException during ASSIGN of complex node returned from XQuery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.2
    • 1.3.2
    • JBI Integration
    • None
    • ServiceMix 3.3

    Description

      I did a following xquery assign:

      <assign name="assign1">
      <copy>
      <from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0">
      <![CDATA[
      for $loopOnce in (1)
      return
      <test:test1>
      <test:test2>abc</test:test2>
      </test:test1>
      ]]>
      </from>
      <to variable="myVar" part="TestPart"/>
      </copy>
      </assign>

      and run it in servicemix.
      I got:

      13:26:57,703 | ERROR | pool-4-thread-1 | BpelEngineImpl | ode.bpel.engine.BpelEngineImpl 433 | Scheduled job failed; jobDetail={type=INVOKE_INTERNAL, mexid=65536, pid=

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

      HelloXQueryWorld-1}
      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:847)
      at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:206)
      at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:215)
      at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:402)
      at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:424)
      at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:377)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:386)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:380)
      at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:208)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:379)
      at org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:376)
      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:595)
      Caused by: java.lang.NullPointerException
      at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
      at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source)
      at org.apache.ode.bpel.runtime.ASSIGN.replaceElement(ASSIGN.java:489)
      at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:416)
      at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:81)
      at sun.reflect.GeneratedMethodAccessor26.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)
      ... 17 more

      I noticed that this example run successfully in ODE tests. I saw that a difference is that evaluated node list is of Xerces DOM impl in ODE tests, and Saxon DOM impl in Servicemix.

      Attachments

        1. xqueryComplexAssign.zip
          12 kB
          Rafal Rusin
        2. ode-536-namespace.patch
          0.7 kB
          Colin
        3. assignmentForXQuery.diff
          2 kB
          Rafal Rusin

        Activity

          People

            karthick Karthick Sankarachary
            rrusin Rafal Rusin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: