[ 
https://issues.apache.org/activemq/browse/SM-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39442
 ] 

Gert Vanthienen commented on SM-787:
------------------------------------

After checking with the XFire mailing list and trying out some things, it 
appears that the exception only occurs if the body of the content is a 
StAXSource.  When a DomSource enters Jsr181ExchangeProcessor's process() 
method, everything works fine.  That explains why the error doesn't occur when 
setting the logging to DEBUG (conversion of body content to a re-readable XML 
source type).  Could there be something wrong with our implementations for 
StaxSource, FragmentStreamReader, ...?  I've already tried replacing our 
StaxSource with JDK 1.6 StAXSource implementation (for testing), but that 
doesn't help either

> IllegalStateException when reading XML message
> ----------------------------------------------
>
>                 Key: SM-787
>                 URL: https://issues.apache.org/activemq/browse/SM-787
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jsr181
>    Affects Versions: 3.1
>            Reporter: Horst Studer
>
> When sending a message to a JSR-181 service unit, I get an 
> IllegalStateException
> thown by the Woodstox XML Processor (see stack trace).
> It is important to note that this exception does NOT occur if the log-level 
> for org.apache.servicemix
> is set to DEBUG. But it occurs if the log-level is INFO. This means that 
> writing the message to
> the log seams to prevent the IllegalStateException from happening.
> Here is the stack trace:
> 17:09:14,806 | ERROR | pool-flow.seda.servicemix-jsr181-thread-1 | 
> DefaultFaultHandler      | re.handler.DefaultFaultHandler   35 | Fault 
> occurred!
> java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT 
> or ENTITY_REFERENCE
>       at 
> com.ctc.wstx.sr.BasicStreamReader.getLocalName(BasicStreamReader.java:708)
>       at 
> org.codehaus.xfire.util.stax.DepthXMLStreamReader.getLocalName(DepthXMLStreamReader.java:100)
>       at 
> org.codehaus.xfire.aegis.stax.ElementReader.<init>(ElementReader.java:58)
>       at 
> org.codehaus.xfire.aegis.stax.ElementReader.<init>(ElementReader.java:69)
>       at 
> org.apache.servicemix.jsr181.xfire.ServiceFactoryHelper$FixedJAXWSOperationBinding.readMessage(ServiceFactoryHelper.java:403)
>       at 
> org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
>       at 
> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
>       at 
> org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
>       at 
> org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
>       at 
> org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:110)
>       at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>       at 
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
>       at 
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>       at 
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>       at 
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>       at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
>       at 
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>       at 
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>       at 
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>       at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to