Hi,
   I am still facing this same problem and I am not able to resolve it.
Please provide some advice on how to solve this or at least a workaround.
   This is very important so please help us.

Thanks,
Sandeep


Hi Guys,

    I am still facing the same problem. But this time it is while getting
response back (previous problem was that even request was not forwarding
from camel component. And that got resolved with having
convertToBody(DOMSource.class) after from(...) statment).

   Error log:
     com.ctc.wstx.exc.WstxIOException: Attempted read on closed stream.
    at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
    at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
    at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:660)
    at
com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:331)
    at
org.apache.servicemix.jbi.jaxp.StAXSourceTransformer.toXMLStreamReader(StAXSourceTransformer.java:86)
    at
org.apache.servicemix.http.endpoints.DefaultHttpConsumerMarshaler.sendOut(DefaultHttpConsumerMarshaler.java:78)
    at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.sendOut(HttpConsumerEndpoint.java:392)
    at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpConsumerEndpoint.java:273)
    at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

   To solve the above problem I tried same step as you suggested and added
convertToBody(DOMSource.class) after to(.......) statement. Camel
configuration with the added changes is as follows :

   
from("jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService";)
        .convertBodyTo(DOMSource.class)  //added here
        .choice()
        .when(header("userPrincipals").contains("director"))       
           
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/PortalService?mep=in-out";)
            .convertBodyTo(DOMSource.class)   //added here
        .when(header("userPrincipals").contains("portal"))
           
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/DirectorService?mep=in-out";)
            .convertBodyTo(DOMSource.class);   //added here

After the above changes almost all was working, but some times I am getting
following exception:

ERROR - DeadLetterChannel              - Failed delivery for exchangeId:
ID-rsandeep/34384-1218012001777/0-0. On delivery attempt: 0 caught:
org.apache.camel.RuntimeCamelException: java.io.IOException: Attempted read
on closed stream.
org.apache.camel.RuntimeCamelException: java.io.IOException: Attempted read
on closed stream.
        at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:411)
        at
org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:50)
        at
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:67)
        at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:59)
        at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:50)
        at
org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:41)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.servicemix.camel.CamelJbiEndpoint.handleActiveProviderExchange(CamelJbiEndpoint.java:101)
        at
org.apache.servicemix.camel.CamelJbiEndpoint.process(CamelJbiEndpoint.java:74)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
        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)
Caused by: java.io.IOException: Attempted read on closed stream.
        at
org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(AutoCloseInputStream.java:165)
        at
org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:85)
        at
org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown
Source)
        at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at
org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at
org.apache.camel.converter.jaxp.XmlConverter.toDOMSourceFromStream(XmlConverter.java:366)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:407)
        ... 26 more


-- 
View this message in context: 
http://www.nabble.com/Pls%3AUrgent%3A%21%21%21%21-Strange-behaviour-with-log4j.xml-tp18688010p18942096.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to