Gert Vanthienen wrote:
>
> L.S.,
>
> Did you perhaps forget to add your JMS SU to the SA project as a
> dependency? Could you post a full stack trace of the exception you
> see? Also, you can use JMX to access the container and see what
> endpoints have been deployed.
>
> Regards,
>
> Gert Vanthienen
>
> FreshAir wrote:
>> Hi,
>> I was walked through the tutorial provided by your web, which is
>> 3.Beginner
>> Using Apache Camel inside Servicemix. In Section 3.4, as you said, I
>> added a
>> JMS su to the project and I copy every step as you told. But when I ran
>> the
>> example, Exception as the title came out, saying “Could not find route
>> for
>> exchange…” + that InOnly Message “Hello world”. I think there must be
>> some
>> problem in configuring the endpoint of the JMS consumer and provider in
>> the
>> MyRouterBuilder.java file. The following is right:
>> from("timer://tutorial?fixedRate=true&period=10000") // 1
>> .setBody(constant("Hello world! Hello ChenShuang!"))
>>
>> // 2
>> .to("log:tutorial");
>> But this is why the exception comes out:
>> public class MyRouteBuilder extends RouteBuilder {
>>
>> public void configure() {
>> //send a message to a JBI endpoint...
>> from("timer://tutorial?fixedRate=true&period=10000")
>>
>> // 1
>> .setBody(constant("<message>Hello world!</message>"))
>>
>> // 2
>>
>> .to("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:provider");
>> // 3
>>
>> //...and receive messages sent by other JBI endpoints
>>
>> from("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:consumer")
>>
>> // 1
>> .to("log:tutorial-jbi")
>>
>> // 2
>> .convertBodyTo(DOMSource.class)
>>
>> // 3
>> .to("log:tutorial-domsource")
>>
>> // 2
>> .convertBodyTo(String.class)
>>
>> // 3
>> .to("log:tutorial-string");
>>
>> // 2
>> }
>> }
>> Can someone help me? (did I miss sth, I followed the example?)
>>
>>
>
>
>
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
>
Sir:
Thanks for you early reply.
And the full stack was like this:
ERROR - DeadLetterChannel - On delivery attempt: 5 caught:
org.apac
he.servicemix.camel.JbiException: javax.jbi.messaging.MessagingException:
Could
not find route for exchange: InOnly[
id: ID:172.16.253.6-11aebab67c5-16:77
status: Active
role: provider
in: <?xml version="1.0" encoding="UTF-8"?><message>Hello world!</message>
] for service: null and interface: null
org.apache.servicemix.camel.JbiException:
javax.jbi.messaging.MessagingException
: Could not find route for exchange: InOnly[
id: ID:172.16.253.6-11aebab67c5-16:77
status: Active
role: provider
in: <?xml version="1.0" encoding="UTF-8"?><message>Hello world!</message>
] for service: null and interface: null
at
org.apache.servicemix.camel.ToJbiProcessor.process(ToJbiProcessor.jav
a:91)
at
org.apache.servicemix.camel.JbiEndpoint$1.process(JbiEndpoint.java:46
)
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$Processor
ToAsynProcessorBridge.process(AsyncProcessorTypeConverter.java:44)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:7
3)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChanne
l.java:136)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChanne
l.java:86)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:103)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:87)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProc
essor.java:40)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:44)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:68)
at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(Time
rConsumer.java:100)
at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.ja
va:52)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: javax.jbi.messaging.MessagingException: Could not find route for
exch
ange: InOnly[
id: ID:172.16.253.6-11aebab67c5-16:77
status: Active
role: provider
in: <?xml version="1.0" encoding="UTF-8"?><message>Hello world!</message>
] for service: null and interface: null
at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(Defaul
tBroker.java:297)
at
org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(S
ecuredBroker.java:81)
at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBICont
ainer.java:830)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
ryChannelImpl.java:395)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deli
veryChannelImpl.java:470)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(Deli
veryChannelImpl.java:442)
at
org.apache.servicemix.camel.ToJbiProcessor.process(ToJbiProcessor.jav
a:76)
... 14 more
all the dependencies have been properly added, I believe. And the xbean.xml
in JMS SU was like this:
<jms:provider service="tutorial:jms"
endpoint="provider"
destinationName="tutorial.camel.queue"
connectionFactory="#connectionFactory" />
<!-- END SNIPPET: provider -->
<jms:consumer service="tutorial:jms"
endpoint="consumer"
destinationName="tutorial.camel.queue"
connectionFactory="#connectionFactory"
targetService="tutorial:jms"
targetEndpoint="consumer" />
Further, in the jconsole, before i deployed the project,it was:
http://www.nabble.com/file/p18271259/before-camel-tutorial-added.bmp
and after deployed:
http://www.nabble.com/file/p18271259/after-camel-tutorial-added.jpeg
It is slightly different with what the corresponding tutorial has presented,
and I am so confused since I strictly followed the tutorial.
would you please give me your msn so i can ask more questions since i am
really fresh to servicemix? mine:[EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/%22Could-not-find-route-for-exchange...%22-in-camel-tutorial-tp18255867p18271259.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.