You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sylvester <sy...@gmail.com> on 2008/12/08 12:24:46 UTC

some trouble with camel-bean

Hi,

I'm having trouble hitting a bean su with camel. I've tried numerous 
ways of specifying the bean endpoint. I always get the same error:

| ERROR | pool-flow.seda.servicemix-camel-thread-6 | 
DeadLetterChannel        | .apache.camel.processor.Logger  189 | Failed 
delivery for exchangeId: ID-[   ]-/2686-1228729911218/0-7. On delivery 
attempt: 0 caught: 
org.apache.camel.component.bean.NoBeanAvailableException: No bean 
available for endpoint: 
http://servicemix.apache.org/replaceMe:service1/onMessageExchange

here http://servicemix.apache.org/replaceMe:service1 is the same as in 
the xbean of the endpoint and onMessageExchange is the only function in 
that class.
Q1: How do I correctly specify the endpoint in the routeBuilder?
Q2: Is it necessary to have annotations in the bean? I tried various 
(including none), didn't work

My route is a simple forwarder like: from (IN).to(BEAN_ENDPOINT).

Thanks,
Sylvester





Re: some trouble with camel-bean

Posted by James Strachan <ja...@gmail.com>.
2008/12/8 Sylvester <sy...@gmail.com>:
> Hi,
>
> I'm having trouble hitting a bean su with camel. I've tried numerous ways of
> specifying the bean endpoint. I always get the same error:
>
> | ERROR | pool-flow.seda.servicemix-camel-thread-6 | DeadLetterChannel
>  | .apache.camel.processor.Logger  189 | Failed delivery for exchangeId:
> ID-[   ]-/2686-1228729911218/0-7. On delivery attempt: 0 caught:
> org.apache.camel.component.bean.NoBeanAvailableException: No bean available
> for endpoint:
> http://servicemix.apache.org/replaceMe:service1/onMessageExchange

BTW the Camel bean component refers to beans by name in the local
Spring context; not using JBI endpoint URIs. If you want to interact
with a servicemix-bean endpoint, use the JBI component and JBI URIs in
Camel

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Re: some trouble with camel-bean

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

All the JBI endpoint can be addressed by using the URI format described 
in http://activemq.apache.org/camel/jbi.html.

In your case, you can use 
"jbi:service:http://servicemix.apache.org/replaceMe/service1" to address 
the service.  If you service has multiple endpoints and you want to 
address this specific endpoint, use 
"jbi:endpoint:http://servicemix.apache.org/replaceMe/service1/endpoint" 
instead.

Regards,

Gert

Sylvester wrote:
> I think the main problem is that I am not sure how to specify bean 
> endpoints in the routeBuilder.
>
> The xbean of the endpoints the the routbuilder should send the message 
> to looks like this:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>       xmlns:bean="http://servicemix.apache.org/bean/1.0"
>       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>       xsi:schemaLocation="http://servicemix.apache.org/bean/1.0 
> http://servicemix.apache.org/schema/servicemix-bean-3.2.3.xsd
>       http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>  <bean:endpoint service="replaceMe:service1" endpoint="endpoint" 
> bean="#myBean1"/>
>  <bean:endpoint service="replaceMe:service2" endpoint="endpoint" 
> bean="#myBean2"/>
>
>
>  <bean id="myBean1" class="org.BeanSU.MyBean1"/>
>  <bean id="myBean2" class="org.BeanSU.MyBean2"/>
>
> </beans>
>
> so if I have to send to replaceMe:service1 then what exactly goes here?
>
> from(IN).to([WHAT GOES HERE? THIS SHOULD REFER TO THE 
> replaceMe:service1 ENDPOINT])
>
> should it be just: replaceMe:service1 or do I need the uri of 
> replaceMe? Do I need to prefix it with bean:? etc etc
>
> Thanks,
> Sylvester
>
>
>
>
> Ashwin Karpe wrote:
>> Hi,
>>
>> CAn you place an appropriately scrubbed sample for me to review. I am 
>> not
>> clear on what is going on based on your input.
>>
>> Cheers,
>>
>> Ashwin...
>>
>>
>> Sylvester Steele wrote:
>>  
>>> Hi,
>>>
>>> I'm having trouble hitting a bean su with camel. I've tried numerous 
>>> ways of specifying the bean endpoint. I always get the same error:
>>>
>>> | ERROR | pool-flow.seda.servicemix-camel-thread-6 | 
>>> DeadLetterChannel        | .apache.camel.processor.Logger  189 | 
>>> Failed delivery for exchangeId: ID-[   ]-/2686-1228729911218/0-7. On 
>>> delivery attempt: 0 caught: 
>>> org.apache.camel.component.bean.NoBeanAvailableException: No bean 
>>> available for endpoint: 
>>> http://servicemix.apache.org/replaceMe:service1/onMessageExchange
>>>
>>> here http://servicemix.apache.org/replaceMe:service1 is the same as 
>>> in the xbean of the endpoint and onMessageExchange is the only 
>>> function in that class.
>>> Q1: How do I correctly specify the endpoint in the routeBuilder?
>>> Q2: Is it necessary to have annotations in the bean? I tried various 
>>> (including none), didn't work
>>>
>>> My route is a simple forwarder like: from (IN).to(BEAN_ENDPOINT).
>>>
>>> Thanks,
>>> Sylvester
>>>
>>>
>>>
>>>
>>>
>>>
>>>     
>>
>>
>> -----
>> --- Ashwin Karpe, Principal Consultant, PS - Opensource Center of 
>> Competence Progress Software Corporation
>> 14 Oak Park Drive
>> Bedford, MA 01730
>> --- +1-972-304-9084 (Office) +1-972-971-1700 (Mobile) ---- Blog: 
>> http://opensourceknowledge.blogspot.com/
>>
>>
>>   
>
>


Re: some trouble with camel-bean

Posted by Sylvester <sy...@gmail.com>.
I think the main problem is that I am not sure how to specify bean 
endpoints in the routeBuilder.

The xbean of the endpoints the the routbuilder should send the message 
to looks like this:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:bean="http://servicemix.apache.org/bean/1.0"
       xmlns:replaceMe="http://servicemix.apache.org/replaceMe"
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://servicemix.apache.org/bean/1.0 
http://servicemix.apache.org/schema/servicemix-bean-3.2.3.xsd
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

  <bean:endpoint service="replaceMe:service1" endpoint="endpoint" 
bean="#myBean1"/>
  <bean:endpoint service="replaceMe:service2" endpoint="endpoint" 
bean="#myBean2"/>
 

  <bean id="myBean1" class="org.BeanSU.MyBean1"/>
  <bean id="myBean2" class="org.BeanSU.MyBean2"/>

</beans>

so if I have to send to replaceMe:service1 then what exactly goes here?

from(IN).to([WHAT GOES HERE? THIS SHOULD REFER TO THE replaceMe:service1 
ENDPOINT])

should it be just: replaceMe:service1 or do I need the uri of replaceMe? 
Do I need to prefix it with bean:? etc etc

Thanks,
Sylvester




Ashwin Karpe wrote:
> Hi,
>
> CAn you place an appropriately scrubbed sample for me to review. I am not
> clear on what is going on based on your input.
>
> Cheers,
>
> Ashwin...
>
>
> Sylvester Steele wrote:
>   
>> Hi,
>>
>> I'm having trouble hitting a bean su with camel. I've tried numerous 
>> ways of specifying the bean endpoint. I always get the same error:
>>
>> | ERROR | pool-flow.seda.servicemix-camel-thread-6 | 
>> DeadLetterChannel        | .apache.camel.processor.Logger  189 | Failed 
>> delivery for exchangeId: ID-[   ]-/2686-1228729911218/0-7. On delivery 
>> attempt: 0 caught: 
>> org.apache.camel.component.bean.NoBeanAvailableException: No bean 
>> available for endpoint: 
>> http://servicemix.apache.org/replaceMe:service1/onMessageExchange
>>
>> here http://servicemix.apache.org/replaceMe:service1 is the same as in 
>> the xbean of the endpoint and onMessageExchange is the only function in 
>> that class.
>> Q1: How do I correctly specify the endpoint in the routeBuilder?
>> Q2: Is it necessary to have annotations in the bean? I tried various 
>> (including none), didn't work
>>
>> My route is a simple forwarder like: from (IN).to(BEAN_ENDPOINT).
>>
>> Thanks,
>> Sylvester
>>
>>
>>
>>
>>
>>
>>     
>
>
> -----
> --- 
> Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
> Progress Software Corporation
> 14 Oak Park Drive
> Bedford, MA 01730
> --- 
> +1-972-304-9084 (Office) 
> +1-972-971-1700 (Mobile) 
> ---- 
> Blog: http://opensourceknowledge.blogspot.com/
>
>
>   


Re: some trouble with camel-bean

Posted by Ashwin Karpe <as...@progress.com>.
Hi,

CAn you place an appropriately scrubbed sample for me to review. I am not
clear on what is going on based on your input.

Cheers,

Ashwin...


Sylvester Steele wrote:
> 
> Hi,
> 
> I'm having trouble hitting a bean su with camel. I've tried numerous 
> ways of specifying the bean endpoint. I always get the same error:
> 
> | ERROR | pool-flow.seda.servicemix-camel-thread-6 | 
> DeadLetterChannel        | .apache.camel.processor.Logger  189 | Failed 
> delivery for exchangeId: ID-[   ]-/2686-1228729911218/0-7. On delivery 
> attempt: 0 caught: 
> org.apache.camel.component.bean.NoBeanAvailableException: No bean 
> available for endpoint: 
> http://servicemix.apache.org/replaceMe:service1/onMessageExchange
> 
> here http://servicemix.apache.org/replaceMe:service1 is the same as in 
> the xbean of the endpoint and onMessageExchange is the only function in 
> that class.
> Q1: How do I correctly specify the endpoint in the routeBuilder?
> Q2: Is it necessary to have annotations in the bean? I tried various 
> (including none), didn't work
> 
> My route is a simple forwarder like: from (IN).to(BEAN_ENDPOINT).
> 
> Thanks,
> Sylvester
> 
> 
> 
> 
> 
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: http://www.nabble.com/some-trouble-with-camel-bean-tp20893527p20894711.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.