Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 76072 invoked from network); 26 Mar 2007 18:04:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Mar 2007 18:04:52 -0000 Received: (qmail 79861 invoked by uid 500); 26 Mar 2007 18:04:58 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 79848 invoked by uid 500); 26 Mar 2007 18:04:58 -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 79839 invoked by uid 99); 26 Mar 2007 18:04:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Mar 2007 11:04:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=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; Mon, 26 Mar 2007 11:04:49 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HVtYQ-0000nG-Gw for dev@activemq.apache.org; Mon, 26 Mar 2007 11:04:26 -0700 Message-ID: <9678340.post@talk.nabble.com> Date: Mon, 26 Mar 2007 11:04:26 -0700 (PDT) From: alaa_nobani To: dev@activemq.apache.org Subject: Error in using ActiveMQ with tomcat 5.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: alaa_nobani@maktoob.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, 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: 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] So what is wrong and what I should I do else??? thanks. -- View this message in context: http://www.nabble.com/Error-in-using-ActiveMQ-with-tomcat-5.5-tf3468628s2354.html#a9678340 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.