L.S.,

Could you try adding a convertBodyTo(String.class).to("log:before-recipient-list") right before the recipient list bit? The logs indicate that an empty message is being sent to the errorhandler service.

Regards,

Gert

pratibhaG wrote:
What is wrong in this code

from("jbi:service:http://servicemix.in2m.com/operations/errorhandler/ResolvedErrorConsumerService";)
                .setBody(xpath("error/requestData/request"))
                .intercept(new CustomDelegateProcessor())
        
.recipientList(header(ErrorConstants.APPLICATION_NAME).append("?mep=in-out"));



This gives me following output at logs :


DEBUG - SedaQueue                      -
[EMAIL PROTECTED] dequeued
exchange: InOnly[
  id: ID:192.168.2.64-11d2d51eb94-5:9
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/errorhandler}ResolvedErrorConsumerService
  endpoint: camel192-168-2-64-11d2d51eb94-6-14
  in: <?xml version="1.0" encoding="UTF-8"?><error>
  <errorCode>4000</errorCode>
  <requestData><request>
        <updateUserProfile>
                <userName>0910user1</userName>
                <firstName>pratibhaPp</firstName>
                <lastName>ghogalePp</lastName>
                <emailAddress>[EMAIL PROTECTED]</emailAddress>
        </updateUserProfile>
</request></requestData>
  <message>java.net.ConnectException: Connection refused</message>
  <service>DirectorService</service>
</error>
]
DEBUG - CamelJbiComponent              - Received exchange: status: Active,
role: provider
DEBUG - CamelJbiComponent              - Retrieved correlation id:
ID:192.168.2.64-11d2d51eb94-5:9
DEBUG - CamelJbiEndpoint               - Received exchange: InOnly[
  id: ID:192.168.2.64-11d2d51eb94-5:9
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/errorhandler}ResolvedErrorConsumerService
  endpoint: camel192-168-2-64-11d2d51eb94-6-14
  in: <?xml version="1.0" encoding="UTF-8"?><error>
  <errorCode>4000</errorCode>
  <requestData><request>
        <updateUserProfile>
                <userName>0910user1</userName>
                <firstName>pratibhaPp</firstName>
                <lastName>ghogalePp</lastName>
                <emailAddress>[EMAIL PROTECTED]</emailAddress>
        </updateUserProfile>
</request></requestData>
  <message>java.net.ConnectException: Connection refused</message>
  <service>DirectorService</service>
</error>
]
DEBUG - DeliveryChannelImpl            - SendSync
ID:192.168.2.64-11d2d51eb94-2:15 in DeliveryChannel{servicemix-camel}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SecuredBroker                  - service name
:{http://servicemix.in2m.com/operations/errorhandler}DirectorService
DEBUG - SecuredBroker                  - operation name :null
DEBUG - SedaFlow                       - Called Flow send
DEBUG - DeliveryChannelImpl            - Waiting for exchange
ID:192.168.2.64-11d2d51eb94-2:15 (1e4a154) to be answered in
DeliveryChannel{servicemix-camel} from sendSync
DEBUG - SedaQueue                      -
[EMAIL PROTECTED] dequeued
exchange: InOut[
  id: ID:192.168.2.64-11d2d51eb94-2:15
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/errorhandler}DirectorService
  endpoint: directorEndpoint
  in: null
]
DEBUG - HttpComponent                  - Received exchange: status: Active,
role: provider
DEBUG - HttpComponent                  - Retrieved correlation id: null
ERROR - HttpComponent                  - Error processing exchange InOut[
  id: ID:192.168.2.64-11d2d51eb94-2:15
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/errorhandler}DirectorService
  endpoint: directorEndpoint
  in: null
]
javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when
document has no root (ie. trying to output empty document).
        at
com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1473)
        at
com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1502)
        at
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1663)
        at
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:130)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
        at
org.apache.servicemix.http.processors.ProviderProcessor.writeMessage(ProviderProcessor.java:335)
        at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:137)
        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)
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.64-11d2d51eb94-2:15 in DeliveryChannel{servicemix-http}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
[EMAIL PROTECTED] dequeued
exchange: InOut[
  id: ID:192.168.2.64-11d2d51eb94-2:15
  status: Error
  role: consumer
  service:
{http://servicemix.in2m.com/operations/errorhandler}DirectorService
  endpoint: directorEndpoint
  in: null
  error: javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT
when document has no root (ie. trying to output empty document).
]
DEBUG - DeliveryChannelImpl            - Notifying exchange
ID:192.168.2.64-11d2d51eb94-2:15(1e4a154) in
DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
DEBUG - DeliveryChannelImpl            - Notified:
ID:192.168.2.64-11d2d51eb94-2:15(1e4a154) in
DeliveryChannel{servicemix-camel} from sendSync
ERROR - DeadLetterChannel              - Failed delivery for exchangeId:
ID-gpratibha.site/51845-1224826008387/0-9. On delivery attempt: 0 caught:
javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when
document has no root (ie. trying to output empty document).
javax.xml.stream.XMLStreamException: Trying to write END_DOCUMENT when
document has no root (ie. trying to output empty document).
        at
com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1473)
        at
com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1502)
        at
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1663)
        at
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:130)
        at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
        at
org.apache.servicemix.http.processors.ProviderProcessor.writeMessage(ProviderProcessor.java:335)
        at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:137)
        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)
*******************request=JbiMessage:
[EMAIL PROTECTED]:
{org.apache.camel.Redelivered=true, org.apache.camel.RedeliveryCounter=1,
application=jbi:service:http://servicemix.in2m.com/operations/errorhandler/DirectorService}}
INFO  - JBIContainer                   - Activating component for:
[container=ServiceMix,name=ID:192.168.2.64-11d2d51eb94-0:8] with service:
null component: [EMAIL PROTECTED]
INFO  - ComponentMBeanImpl             - Initializing component:
ID:192.168.2.64-11d2d51eb94-0:8
INFO  - ComponentMBeanImpl             - Starting component:
ID:192.168.2.64-11d2d51eb94-0:8
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.64-11d2d51eb94-68:0 in
DeliveryChannel{ID:192.168.2.64-11d2d51eb94-0:8}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SecuredBroker                  - service name
:{http://servicemix.in2m.com/operations/errorhandler}SystemErrorService
DEBUG - SecuredBroker                  - operation name :null
DEBUG - SedaFlow                       - Called Flow send
ERROR - DeadLetterChannel              - Failed delivery for exchangeId:
ID-gpratibha.site/51845-1224826008387/0-9. Handled by the failure processor:
Delegate(null)
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.64-11d2d51eb94-5:9 in DeliveryChannel{servicemix-camel}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
[EMAIL PROTECTED] dequeued
exchange: InOnly[
  id: ID:192.168.2.64-11d2d51eb94-5:9
  status: Done

Reply via email to