camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Error when using Camel write to Websphere MQ
Date Fri, 22 Feb 2013 16:25:39 GMT
Hi

Did you find a solution to this?
>From your exception it sounds like you have mixed versions of IBM
WebSphere JARs on the classpath.


On Tue, Feb 19, 2013 at 8:22 PM, sguruprasanna <s.guruprasanna@gmail.com> wrote:
> I am new to Camel,  as a proof of concept, I am trying to read from a
> Websphere MQ queue and write to another queue. The queues exist on two
> different queue managers.
>
> Below is my is my route configuration:
>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="
>          http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>          http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
>
>   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>     <package>org.apache.camel.example.spring</package>
>   </camelContext>
>
>         <bean id="wmq-qm2" class="org.apache.camel.component.jms.JmsComponent">
>           <property name="connectionFactory">
>             <bean class="com.ibm.mq.jms.MQConnectionFactory">
>                 <property name="transportType" value="1"/>
>                 <property name="hostName" value="host2"/>
>                 <property name="port" value="1414"/>
>                 <property name="channel" value="TO.QM2.SVRCONN"/>
>                 <property name="queueManager" value="QM2"/>
>             </bean>
>           </property>
>         </bean>
>
>
>         <bean id="wmq-qm1" class="org.apache.camel.component.jms.JmsComponent">
>           <property name="connectionFactory">
>             <bean class="com.ibm.mq.jms.MQConnectionFactory">
>                 <property name="transportType" value="1"/>
>                 <property name="hostName" value="host1"/>
>                 <property name="port" value="2414"/>
>                 <property name="channel" value="TO.QM1.SVRCONN"/>
>                 <property name="queueManager" value="QM1"/>
>             </bean>
>           </property>
>         </bean>
> </beans>
>
>
>
> Below is the RouteBuilder java file:
>
>
> public class MyRouteBuilder extends RouteBuilder {
>
>     /**
>      * Allow this route to be run as an application
>      */
>     public static void main(String[] args) throws Exception {
>         new Main().run(args);
>     }
>
>     public void configure() {
>         // populate the message queue with some messages
>         //from("file:src/data").
>                 //to("wmq-brkdev:GURU.DG");
>
>        from("wmq-sidev:GURU.DG").
>         to("wmq-brkdev:JBOSS.DG");
>
>         //from("wmq:test.MyQueue").
>                 //to("file://target/test?noop=true");
>
>         // set up a listener on the file component
>         //from("file://target/test?noop=true").
>                 //bean(new SomeBean());
>     }
>
>     public static class SomeBean {
>
>         public void someMethod(String body) {
>             System.out.println("Received: " + body);
>         }
>     }
>
> }
>
>
> I get the following exception.. Is it possible to do what I am trying to do
> in camel?
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> com.ibm.mq.jmqi.JmqiEnvironment.getFlightRecorder()Lcom/ibm/mq/jmqi/monitoring/FlightRecorder;
>         at
> com.ibm.msg.client.wmq.internal.WMQConnection.start(WMQConnection.java:2111)
>         at
> com.ibm.msg.client.jms.internal.JmsConnectionImpl.start(JmsConnectionImpl.java:773)
>         at com.ibm.mq.jms.MQConnection.start(MQConnection.java:437)
>         at
> org.springframework.jms.listener.AbstractJmsListeningContainer.startSharedConnection(AbstractJmsListeningContainer.java:440)
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer.startSharedConnection(DefaultMessageListenerContainer.java:764)
>         at
> org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:290)
>         at
> org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:263)
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer.start(DefaultMessageListenerContainer.java:555)
>         at
> org.apache.camel.component.jms.JmsConsumer.startListenerContainer(JmsConsumer.java:84)
>         at org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java:124)
>         at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
>         at
> org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1675)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:1947)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:1902)
>         at
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1830)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1614)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1504)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1391)
>         at
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:181)
>         at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
>         at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1359)
>         at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:230)
>         at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
>         at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:240)
>         at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
>         at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>         at
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:186)
>         at org.apache.camel.spring.Main.doStart(Main.java:140)
>         at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
>         at org.apache.camel.main.MainSupport.run(MainSupport.java:139)
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Error-when-using-Camel-write-to-Websphere-MQ-tp5727817.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message