Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 20396 invoked from network); 3 Apr 2007 11:05:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2007 11:05:45 -0000 Received: (qmail 61268 invoked by uid 500); 3 Apr 2007 11:05:51 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 61140 invoked by uid 500); 3 Apr 2007 11:05:51 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 61111 invoked by uid 99); 3 Apr 2007 11:05:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 04:05:51 -0700 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 04:05:42 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HYgpF-00053o-TM for dev@activemq.apache.org; Tue, 03 Apr 2007 04:05:21 -0700 Message-ID: <9807530.post@talk.nabble.com> Date: Tue, 3 Apr 2007 04:05:21 -0700 (PDT) From: OSD To: dev@activemq.apache.org Subject: Re: Tomcat Integration problem In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: amitmokal@yahoo.com References: <009001c77050$f2be97a0$6701a8c0@nobani> X-Virus-Checked: Checked by ClamAV on apache.org I'm using the apache active mq 4.1.1 package and have this error when I try to lookup a Queue from the jndi context javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:351) James.Strachan wrote: > > Use the org.apache.activemq package > > On 3/27/07, Alaa Alnobani wrote: >> Hi, please I need your help: >> I am new to ActiveMQ and tried to integrate it with tomcat 5.5 so I >> copied all the necessary JARS to the common/lib directory in tomcat then >> I added a META-INF/context.xml to my web application directory >> contaning: >> >> > name="jms/ConnectionFactory" >> auth="Container" >> type="org.activemq.ActiveMQConnectionFactory" >> description="JMS Connection Factory" >> factory="org.activemq.jndi.JNDIReferenceFactory" >> brokerURL="ssl://localhost:61616" >> brokerName="LocalActiveMQBroker" >> useEmbeddedBroker="false"/> >> >> > auth="Container" >> type="org.activemq.message.ActiveMQTopic" >> factory="org.activemq.jndi.JNDIReferenceFactory" >> physicalName="MY.TEST.FOO"/> >> >> >> >> then I tried to use it in a servlet like this : >> >> InitialContext initCtx = new InitialContext(); >> Context envContext = (Context) initCtx.lookup("java:comp/env"); >> ConnectionFactory connectionFactory = (ConnectionFactory) >> envContext.lookup("jms/ConnectionFactory"); >> Connection connection = connectionFactory.createConnection(); >> Session session = connection.createSession(false, >> Session.AUTO_ACKNOWLEDGE); >> MessageProducer producer = session.createProducer((Destination) >> envContext.lookup("jms/topic/MyTopic")); >> >> Message testMessage = session.createMessage(); >> testMessage.setStringProperty("testKey", "testValue"); >> producer.send(testMessage); >> >> >> When I request the servlet the following exception comes up: >> javax.naming.NamingException: Could not load resource factory class [Root >> exception is java.lang.ClassNotFoundException: >> org.activemq.jndi.JNDIReferenceFactory] >> >> BTW i am using activeMQ version 4.1.0 with tomcat 5.5.17 and Java 1.5. >> >> So what is wrong and what I should I do else??? >> >> thanks. >> > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > -- View this message in context: http://www.nabble.com/Tomcat-Integration-problem-tf3472184s2354.html#a9807530 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.