You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by FreshAir <li...@yahoo.com.cn> on 2008/07/03 11:56:26 UTC

"Could not find route for exchange..." in camel tutorial

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?)

-- 
View this message in context: http://www.nabble.com/%22Could-not-find-route-for-exchange...%22-in-camel-tutorial-tp18255867p18255867.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: "Could not find route for exchange..." in camel tutorial

Posted by FreshAir <li...@yahoo.com.cn>.


Gert Vanthienen wrote:
> 
> L.S.,
> 
> Well, for starters, I don't see the jms:provider endpoint mentioned in 
> the same tutorial on 3.3 in your endpoints list.  This means that the 
> Camel route can not send a message to that endpoint -- hence the 'Could 
> not find route...'.  Could you check your JMS SU xbean.xml to check that 
> it holds a provider endpoint?
> 
> Regards,
> 
> Gert
> 
> FreshAir wrote:
>>
>> 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:lichen782@live.cn
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
> 

Sir:
I am terribly sorry for wasting your time, since the mistake was caused by
my undefining of the namespace"tutorial:"in JMS SU.
Thanks for your help!
And there comes a new problem I was wondering if you could give a hand:)
It has been said that under camel in servicemix we can use tcp/ip
communication, which is exactly my original goal(I want to use tcp/ip in
servicemix).Now according to the tutorial, the tcp connection is established
using mina.But when I wrote a java program to send a msg to that port using
socket,I cannot see the msg in servicemix console(or shouldn't I?). In
camel, the router configuraion is like this:
//tcp listening...on port 10021
    from("mina:tcp://localhost:10021")                                             
//1  
    	   
.to("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:provider"); 
//2
    	    
    	//...and receive messages sent by other JBI endpoints
    
from("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:consumer")      
    	    .to("log:tutorial-jbi")
    	    .convertBodyTo(DOMSource.class)
    	    .to("log:tutorial-domsource")
    	    .convertBodyTo(String.class)
    	    .to("log:tutorial-string"); 

I assume that any tcp msg should be caught by that port and printed as
expected.(Note that the jms provider and consumer are using the same quene
as configured).
The java client program which sends msg to the port doesn't give any
exception and I can even telnet the "localhost 10021"(yet I cann't see any
info).
Is my assumption wrong, or mina itself has some specification regarding
this?
-- 
View this message in context: http://www.nabble.com/%22Could-not-find-route-for-exchange...%22-in-camel-tutorial-tp18255867p18273717.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: "Could not find route for exchange..." in camel tutorial

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,

Well, for starters, I don't see the jms:provider endpoint mentioned in 
the same tutorial on 3.3 in your endpoints list.  This means that the 
Camel route can not send a message to that endpoint -- hence the 'Could 
not find route...'.  Could you check your JMS SU xbean.xml to check that 
it holds a provider endpoint?

Regards,

Gert

FreshAir wrote:
>
> 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:lichen782@live.cn
>   


Re: "Could not find route for exchange..." in camel tutorial

Posted by FreshAir <li...@yahoo.com.cn>.


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:lichen782@live.cn
-- 
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.


Re: "Could not find route for exchange..." in camel tutorial

Posted by Gert Vanthienen <ge...@skynet.be>.
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?)
>
>