Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 26806 invoked from network); 10 Aug 2008 02:23:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Aug 2008 02:23:41 -0000 Received: (qmail 60812 invoked by uid 500); 10 Aug 2008 02:23:40 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 60787 invoked by uid 500); 10 Aug 2008 02:23:40 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 60776 invoked by uid 99); 10 Aug 2008 02:23:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Aug 2008 19:23:40 -0700 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Aug 2008 02:22:42 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KS0aL-0002CC-Gx for camel-user@activemq.apache.org; Sat, 09 Aug 2008 19:23:09 -0700 Message-ID: <18910283.post@talk.nabble.com> Date: Sat, 9 Aug 2008 19:23:09 -0700 (PDT) From: lee hanu To: camel-user@activemq.apache.org Subject: RE: WebSphere MQ 5.3 and Camel 1.4.0 issue running the sample In-Reply-To: <18906702.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: nishant_avs@yahoo.com References: <18906427.post@talk.nabble.com> <4C1FB9C00D24A140906239533638C4D204DBAF6B@EXVS04.exserver.dk> <18906702.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Thanks for your help Claus. I was able to get this thing working. The link you send was really helpful in getting this to work. I have to create JMSComponent using JMSConfig and settting the value UseVersion102 to "true"= . The code I used is as follows JmsConfiguration jmsConfig =3D new JmsConfiguration(); jmsConfig.setUseVersion102(true); jmsConfig.setConnectionFactory(connectionFactory); jmsConfig.setAcknowledgementModeName("AUTO_ACKNOWLEDGE"); =20 =20 // Note we can explicity name the component //context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory)); context.addComponent("test-jms", new JmsComponent(jmsConfig)); lee hanu wrote: >=20 > Thanks for the quick response Claus. >=20 > This the how I am creating the connectionFactory >=20 >=20 > private static final String CF_CLASS_NAME > =3D"com.ibm.mq.jms.context.WMQInitialContextFactory"; > private static final String WMQ_URL =3D "localhost:1414/SYSTEM.DEF.SVRCON= N"; > =20 > private static final String QCF_NAME =3D "SampleQCF"; > private static final String QUEUE_NAME =3D "SampleQueue"; >=20 > public static void main(String args[]) throws Exception { > // START SNIPPET: e1 > CamelContext context =3D new DefaultCamelContext(); > // END SNIPPET: e1 > // Set up the ActiveMQ JMS Components > // START SNIPPET: e2 >=20 > Properties props =3D new Properties(); > props.put(Context.INITIAL_CONTEXT_FACTORY, CF_CLASS_NAME); > props.put(Context.PROVIDER_URL, WMQ_URL); > InitialContext initCtx =3D new InitialContext(props); >=20 > //ConnectionFactory connectionFactory =3D new > ActiveMQConnectionFactory("vm://localhost?broker.persistent=3Dfalse"); > ConnectionFactory connectionFactory =3D (MQConnectionFactory) > initCtx.lookup(QCF_NAME); > .... > .... >=20 >=20 > The rest of the code is the same. >=20 > I have the following jar in my classpath. >=20 > jdk1.5 > apache-camel-1.4.0.jar > icu4j-4_0.jar > spring.jar > log4j-1.2.14.jar > commons-logging.jar > com.ibm.mq.jar > com.ibm.mq.pcf-6.0.3.jar > com.ibm.mqbind.jar > com.ibm.mqjms.jar > connector.jar > fscontext.jar > jms.jar > jndi.jar > jta.jar > ldap.jar > mqcontext.jar > postcard.jar > providerutil.jar >=20 > Thanks >=20 >=20 > Claus Ibsen wrote: >>=20 >> Hi Lee >>=20 >> Could you post some more of you sample how you get the MQ connection etc= ? >>=20 >> The problem could be a missing .jar on the classpath. When using MQ you >> need all its special .jar files (its client jars). >>=20 >> Or it could be because MQ is expecting the old JMS spec: >> Maybe you need to configure the connection factory to use the old JMS >> spec (1.0.x). >>=20 >> For instance at this page: >> http://activemq.apache.org/camel/jms.html >> there is an option named: useVersion102=20 >>=20 >> But check that you got all the correct .jars in the classpath. >>=20 >>=20 >> Good luck with WebSphere, I know it's a beast to work with. I wrestle it >> at work every day, though its now v6.0 and v6.1. >>=20 >>=20 >> Med venlig hilsen >> =20 >> Claus Ibsen >> ...................................... >> Silverbullet >> Skovsg=C3=A5rdsv=C3=A6nget 21 >> 8362 H=C3=B8rning >> Tlf. +45 2962 7576 >> Web: www.silverbullet.dk >> -----Original Message----- >> From: lee hanu [mailto:nishant_avs@yahoo.com]=20 >> Sent: 9. august 2008 18:50 >> To: camel-user@activemq.apache.org >> Subject: WebSphere MQ 5.3 and Camel 1.4.0 issue running the sample >>=20 >>=20 >> Hi all,=20 >>=20 >> I am trying to run the camel-example-jms-file sample that comes with the >> Camel distribution. I am trying to get this sample running for WebSphere >> MQ >> 5.3. I basically created a simple Java project in eclipse and I made >> changes >> to the CamelJmsToFileExample class to get the connectionFactory for MQ. >> Now >> I am getting the following exception. Can someone let me know how to get >> Camel sample up and running for WebSphere 5.3. >>=20 >> Thanks for you time. >>=20 >> Exception in thread "main" java.lang.NoSuchMethodError: >> javax.jms.ConnectionFactory.createConnection()Ljavax/jms/Connection; >> =09at >> org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor= .java:184) >> =09at >> org.springframework.jms.listener.AbstractJmsListeningContainer.createSha= redConnection(AbstractJmsListeningContainer.java:401) >> =09at >> org.springframework.jms.listener.AbstractJmsListeningContainer.establish= SharedConnection(AbstractJmsListeningContainer.java:370) >> =09at >> org.springframework.jms.listener.DefaultMessageListenerContainer.establi= shSharedConnection(DefaultMessageListenerContainer.java:682) >> =09at >> org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(A= bstractJmsListeningContainer.java:257) >> =09at >> org.springframework.jms.listener.AbstractJmsListeningContainer.initializ= e(AbstractJmsListeningContainer.java:172) >> =09at >> org.springframework.jms.listener.AbstractPollingMessageListenerContainer= .initialize(AbstractPollingMessageListenerContainer.java:200) >> =09at >> org.springframework.jms.listener.DefaultMessageListenerContainer.initial= ize(DefaultMessageListenerContainer.java:461) >> =09at >> org.springframework.jms.listener.AbstractJmsListeningContainer.afterProp= ertiesSet(AbstractJmsListeningContainer.java:135) >> =09at >> org.apache.camel.component.jms.JmsConsumer.doStart(JmsConsumer.java:59) >> =09at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47) >> =09at >> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext= .java:359) >> =09at >> org.apache.camel.impl.DefaultCamelContext.startRoutes(DefaultCamelContex= t.java:557) >> =09at >> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.ja= va:530) >> =09at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47) >> =09at >> com.my.camel.example.jmstofile.CamelJmsToFileExample.main(CamelJmsToFile= Example.java:94) >> --=20 >> View this message in context: >> http://www.nabble.com/WebSphere-MQ-5.3-and-Camel-1.4.0-issue-running-the= -sample-tp18906427s22882p18906427.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >>=20 >>=20 >>=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/WebSphere-MQ-5.3-and-Ca= mel-1.4.0-issue-running-the-sample-tp18906427s22882p18910283.html Sent from the Camel - Users mailing list archive at Nabble.com.