Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-329

Asynchronous File Poller has problems handling errors (likely regression introduced by SM-1441)

    XMLWordPrintableJSON

Details

    • Regression

    Description

      I have an integration process that begins with a smx-file poller endpoint and includes a smx-saxon component. In this flow, smx-saxon throws an exception which is reported back to the smx-file poller as an error. The SMX 3.2.2 file poller handles the error gracefully. The new SMX-3.3-SNAPSHOT file poller reports an error setting the exchange status to ERROR. This appears to be a regression due to SM-1441.

      In order to reproduce the problem, first download and install apache-servicemix-3.3-20080927.213545-1.zip. Then replace the servicemix-saxon 3.3-SNAPSHOT version with the servicemix-saxon 3.2.2 version and update its jbi.xml to reference servicemix-shared-2008.01-SNAPSHOT. Only the servicemix-saxon 3.2.2 version throws the ClassCastException which exposes the smx-file problem. BTW, I have attached my test project in order for you to reproduce the problem.

      The console log is reported below.

      ERROR - SaxonComponent - Error processing exchange InOut[
      id: ID:10.10.10.10-11cc10ecdb8-8:2
      status: Active
      role: provider
      service:

      {urn:eng:spagic:processes:droolsSaxonTest:v0}

      droolsSaxonTest.xqueryPipeline_Transformer_v_0
      endpoint: droolsSaxonTest.xqueryPipeline_Transformer_v_0
      in: <?xml version="1.0" encoding="UTF-8"?><videos featuring="Bila"/>
      out: null
      ]
      java.lang.ClassCastException: net.sf.saxon.tinytree.TinyElementImpl
      at net.sf.saxon.Configuration.buildDocument(Configuration.java:2239)
      at net.sf.saxon.query.StaticQueryContext.buildDocument(StaticQueryContext.java:426)
      at org.apache.servicemix.saxon.XQueryEndpoint.queryContent(XQueryEndpoint.java:126)
      at org.apache.servicemix.saxon.XQueryEndpoint.transform(XQueryEndpoint.java:119)
      at org.apache.servicemix.saxon.SaxonEndpoint.processInOut(SaxonEndpoint.java:220)
      at org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:111)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:596)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:550)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:506)
      at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      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)
      ERROR - FileComponent - Error processing exchange InOnly[
      id: ID:10.10.10.10-11cc10ecdb8-4:2
      status: Error
      role: consumer
      service:

      {urn:eng:spagic:processes:droolsSaxonTest:v0}

      droolsSaxonTest.router_v_0
      endpoint: droolsSaxonTest.router_v_0
      in: <?xml version="1.0" encoding="UTF-8"?><videos featuring="Bila"/>
      error: java.lang.ClassCastException: net.sf.saxon.tinytree.TinyElementImpl
      ]
      java.lang.ClassCastException: net.sf.saxon.tinytree.TinyElementImpl
      at net.sf.saxon.Configuration.buildDocument(Configuration.java:2239)
      at net.sf.saxon.query.StaticQueryContext.buildDocument(StaticQueryContext.java:426)
      at org.apache.servicemix.saxon.XQueryEndpoint.queryContent(XQueryEndpoint.java:126)
      at org.apache.servicemix.saxon.XQueryEndpoint.transform(XQueryEndpoint.java:119)
      at org.apache.servicemix.saxon.SaxonEndpoint.processInOut(SaxonEndpoint.java:220)
      at org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:111)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:596)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:550)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:506)
      at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      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)
      ERROR - FileComponent - Error setting exchange status to ERROR
      javax.jbi.messaging.MessagingException: illegal call to send / sendSync
      at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:614)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:385)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:521)
      at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      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)

      Attachments

        1. SM-1605.diff
          2 kB
          Gert Vanthienen
        2. droolsSaxonTest.zip
          87 kB
          Ron Gavlin

        Activity

          People

            gertvanthienen Gert Vanthienen
            rgavlin Ron Gavlin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: