Or, could it be a jar to add somewhere? It is my first try with the JMS 
component on servicemix.


-----Message d'origine-----
De : Madesclair Vivian [mailto:[email protected]] 
Envoyé : lundi 10 août 2009 11:17
À : [email protected]
Objet : RE: JMS - NoSuchBeanDefinitionException connectionFactory

No worries, I felt that I was doing something strange... Actually it was 
foolish ^^

So I tried inside my provider, my file is like this :
<beans  xmlns stuff>

        <jms:provider   service="routerRecherche:AsyncRechercheRequestJMS"
                                        endpoint="provider"
                                        
destinationName="queue.recherche.Request">
                <property name="connectionFactory">
                        <bean 
class="org.apache.activemq.ActiveMQConnectionFactory">
                                <property name="brokerURL" 
value="tcp://localhost:61616" />
                        </bean>
                </property>
                <!--Configure maximum connections used by the pool -->
                <property name="maxConnections" value="1" />
                <!--Configure maximum sessions per connection -->
                <property name="maximumActive" value="1" />
        </jms:provider>
</beans>

But I am still getting the same error. I am currently investigating but no 
results yet. I am wondering what is this "bean named 'connectionFactory'" that 
smx is looking for. Because now, with your config, I have no more bean named 
connectionFactory. The bean has no name and is directly the value of the 
property. I found a problem similar to mine where the guy had a bean defined in 
his activemq.xml. I checked in mine, there's only a broker defined there.

Anymore ideas are wecome ;)

Best regard,
Vivian


-----Message d'origine-----
De : Jean-Baptiste Onofré [mailto:[email protected]] Envoyé : vendredi 7 août 
2009 19:25 À : [email protected] Objet : Re: JMS - 
NoSuchBeanDefinitionException connectionFactory

s/wan't/didn't/g :)

Apologizes

Jean-Baptiste Onofré wrote:
> Sorry I wan't clear: you need to put the property inside the jms:provider.
> 
> The connectionFactory is a property of the jms:property endpoint.
> 
> Regards
> JB
> 
> Madesclair Vivian wrote:
>> I still have the same following exception :
>>
>> ERROR - JmsComponent -
>> org.springframework.beans.factory.BeanCreationException: Error 
>> creating bean with name 'org.apache.
>> servicemix.jms.endpoints.JmsProviderEndpoint#0' defined in file
>> [C:\Work\Fuse-ESB-3.4.0.2\data\smx\service-assemblies\E3-esb-dispatch-sa\version_10\sus\servicemix-jms\E3-esb-jms-queues-su\xbean.xml]:
>>  
>> Cannot resolve reference to bean 'connectionFactory' while setting 
>> bean property  'connectionFactory'; nested exception is
>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No 
>> bean named 'connectionFactory' is defined
>>
>>
>> Here is my bean again for control, it seems odd to me to put all in a 
>> property.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans     namespaces xxx>
>>
>>     <jms:provider     xxx />
>>     <jms:consumer     xxx />
>>     <jms:provider     xxx />
>>     <jms:consumer     xxx />
>>     
>>     <property name="connectionFactory">
>>         <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>             <property name="brokerURL" value="tcp://localhost:61616" />
>>         </bean>
>>        </property>
>>         <!--Configure maximum connections used by the pool -->
>>         <property name="maxConnections" value="1" />
>>         <!--Configure maximum sessions per connection -->
>>         <property name="maximumActive" value="1" /> </beans>
>>
>> If you ask something else before 6pm GMT+1, I will try, otherwise 
>> I'll search more into it on Monday.
>>
>> Thanks
>> Vivian
>>
>>
>> -----Message d'origine-----
>> De : Jean-Baptiste Onofré [mailto:[email protected]] Envoyé : vendredi
>> 7 août 2009 15:44 À : [email protected] Objet : Re: JMS - 
>> NoSuchBeanDefinitionException connectionFactory
>>
>> Could you try this configuration:
>>
>> <property name="connectionFactory">
>>        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>>          <property name="brokerURL" value="tcp://localhost:61616" />
>>        </bean>
>>      </property>
>>     <!--Configure maximum connections used by the pool --/>
>>     <property name="maxConnections" value="1" />
>>     <!--Configure maximum sessions per connection --/>
>>     <property name="maximumActive" value="1" /> </property>
>>
>> Regards
>> JB
>>
>>
>> Madesclair Vivian wrote:
>>> Yes, I tried both this morning after your reply (what you advised, 
>>> didn't work, then went to the website, didn't work neither)
>>>
>>> So I was learning about spring and amq from the website you gave me 
>>> and some others. Could not make it work this morning. Sorry I did 
>>> not answer, I wanted to have significant things to say when I do.
>>> finally, I got another task to do this afternoon (quite urgent, so I 
>>> forgot about the feedback), I don't know If I will be able to get 
>>> back to my ESB prototype before Monday. I'll keep you updated about 
>>> this, and ask for more help by then if I can't manage to find the 
>>> answer myself.
>>>
>>> Thanks for your consideration! ;)
>>> Vivian
>>>     
>>>
>>> -----Message d'origine-----
>>> De : Jean-Baptiste Onofré [mailto:[email protected]] Envoyé : vendredi
>>> 7 août 2009 11:55 À : [email protected] Objet : Re: JMS - 
>>> NoSuchBeanDefinitionException connectionFactory
>>>
>>> Be careful, it's brokerURL (with URL in caps).
>>>
>>> Regards
>>> JB
>>>
>>> Jean-Baptiste Onofré wrote:
>>>> Hi Vivian,
>>>>
>>>> Try to replace the url property by the brokerUrl.
>>>>
>>>> I think that the documentation is not correct. Refering to the 
>>>> ActiveMQ
>>>> documentation:
>>>> http://activemq.apache.org/spring-support.html
>>>>
>>>> the connection factory expects a brokerUrl property and not url.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> Madesclair Vivian wrote:
>>>>> Hi there,
>>>>>  
>>>>> I am trying to use camel inside servicemix. So in order to send 
>>>>> message to camel, I used JMS queues.
>>>>> It seems I am making mistakes in defining the JMS SU, because I am 
>>>>> getting this exception when deploying the SA on smx :
>>>>> NoSuchBeanDefinitionException: No bean named 'connectionFactory' 
>>>>> is defined
>>>>>  
>>>>> Here is the bean from my JMS SU :
>>>>> <?xml version="1.0" encoding="UTF-8"?> <beans 
>>>>> xmlns="http://www.springframework.org/schema/beans";
>>>>>   xmlns:jms="http://servicemix.apache.org/jms/1.0";
>>>>>   xmlns:amq="http://activemq.org/config/1.0";
>>>>>   xmlns:amqpool="http://jencks.org/amqpool/2.0";
>>>>>   
>>>>> xmlns:routerRecherche="http://172.31.196.135:8192/jbi/RouterRecherche";
>>>>>   xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance";
>>>>>   xsi:schemaLocation="http://servicemix.apache.org/jms/1.0
>>>>> http://servicemix.apache.org/schema/servicemix-jms-3.2.3.xsd
>>>>>        http://activemq.org/config/1.0 
>>>>> http://activemq.apache.org/schema/core/activemq-core-4.1.1.xsd
>>>>>        http://www.springframework.org/schema/beans
>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
>>>>>  
>>>>>  <jms:provider  service="routerRecherche:AsyncRechercheRequestJMS"
>>>>>      endpoint="provider"
>>>>>      destinationName="queue.recherche.Request"
>>>>>      connectionFactory="#connectionFactory" />
>>>>>  
>>>>>  <jms:consumer  service="routerRecherche:AsyncRechercheRequestJMS"
>>>>>      endpoint="consumer"
>>>>>      destinationName="queue.recherche.Response"
>>>>>      connectionFactory="#connectionFactory"
>>>>>      concurrentConsumers="8" />
>>>>>  
>>>>>  <jms:provider  service="routerRecherche:AsyncRechercheResponseJMS"
>>>>>      endpoint="provider"
>>>>>      destinationName="queue.recherche.Response"
>>>>>      connectionFactory="#connectionFactory" />
>>>>>  
>>>>>  <jms:consumer  service="routerRecherche:AsyncRechercheResponseJMS"
>>>>>      endpoint="consumer"
>>>>>      destinationName="queue.recherche.Response"
>>>>>      connectionFactory="#connectionFactory"
>>>>>      concurrentConsumers="8" />
>>>>>  
>>>>>  
>>>>>  <amqpool:xa-pool  id="connectionFactory"       
>>>>> url="tcp://localhost:61616" />
>>>>> </beans>
>>>>>  
>>>>> I am quite sure I am doing a beginner's mistake. Anyone has any 
>>>>> idea about it?
>>>>>  
>>>>> Thanks
>>>>> Vivian
>>>>>
> 

--
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
[email protected]
PGP : 17D4F086

Reply via email to