Quantcast

deploy on Service Mix project with activemq

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

deploy on Service Mix project with activemq

DanielArias
Hi, good morning;

I'm trying to run my jar file on service mix in the deploy folder.

In the camel context I make the connection to the broker to use activemq.

Some errors show up when I try to run my project in service mix:

karaf@root>Exception in thread "SpringOsgiExtenderThread-4" org.springframework.
beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.active
mq.ActiveMQConnectionFactory] for bean with name 'jmsConnectionFactory' defined
in URL [bundle://280.0:0/META-INF/spring/camel-context.xml]; nested exception is
 java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
 not found from bundle [MyProject]
        at org.springframework.beans.factory.support.AbstractBeanFactory.resolve

Here is my camel-contex

        <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL" value="tcp://192.168.4.54:61616" />
               
                <property name="userName" value="username"></property>
                <property name="password" value="password"></property>
        </bean>


        <bean id="poolConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
                init-method="start" destroy-method="stop">
                <property name="maxConnections" value="8" />
                <property name="connectionFactory" ref="jmsConnectionFactory" />
        </bean>

        <bean id="jmsTransactionManager"
                class="org.springframework.jms.connection.JmsTransactionManager">
                <property name="connectionFactory" ref="poolConnectionFactory" />
        </bean>

        <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
                <property name="connectionFactory" ref="poolConnectionFactory" />
                <property name="transacted" value="true" />
                <property name="transactionManager" ref="jmsTransactionManager" />
        </bean>


my camel version is : 2.16.4
service mix version is: 6.1.3

in my service mix when I run bundle:list|grep camel:

151 | Active    |  50 | 2.16.4                             | camel-core

152 | Active    |  50 | 2.16.4                             | camel-catalog

154 | Active    |  50 | 2.16.4                             | camel-jms

155 | Active    |  50 | 2.16.4                             | camel-spring

156 | Active    |  50 | 2.16.4                             | camel-blueprint

157 | Active    |  50 | 5.12.3                             | activemq-camel

231 | Active    |  80 | 2.16.4                             | camel-commands-core

232 | Active    |  80 | 2.16.4                             | camel-karaf-command
s
233 | Active    |  50 | 2.16.4                             | camel-cxf-transport

234 | Active    |  50 | 2.16.4                             | camel-cxf

Do I have to make the connection to the broker manually on service mix ? what features should I installed ??

please help, really need to run my project in service mix.

Thanks in advance
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: deploy on Service Mix project with activemq

Dmitry
Hi, Daniel!

Add package "org.apache.activemq" in Import-Package section to your pom file:
<Import-Package>org.apache.activemq</Import-Package>
Loading...