Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 74821 invoked from network); 3 Jun 2002 16:48:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 3 Jun 2002 16:48:36 -0000 Received: (qmail 17361 invoked by uid 97); 3 Jun 2002 16:48:18 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 17344 invoked by uid 97); 3 Jun 2002 16:48:17 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 17332 invoked by uid 98); 3 Jun 2002 16:48:17 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C20B1E.7456BA9A" Subject: Tomcat / JBoss / JNDI lookup not working - HELP! Date: Mon, 3 Jun 2002 11:48:14 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Tomcat / JBoss / JNDI lookup not working - HELP! Thread-Index: AcILHnRDIY9a4zW8S1OdVOs/tf8D3A== From: "Miller, Andy" To: "Tomcat Users List" X-OriginalArrivalTime: 03 Jun 2002 16:48:15.0177 (UTC) FILETIME=[7487B390:01C20B1E] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C20B1E.7456BA9A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have seperate instances of Tomcat and JBoss running on the same machine. I'm trying to do a JNDI lookup of a JMS queue that's configured in JBoss from Tomcat but cannot get it to work. I can see the JNDI tree from the JBoss' JNDIView and all looks fine, here's a a snapshot of the Global JNDI Namespace: =20 Global JNDI Namespace +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- jmx:miller-dp:rmi (class: org.jboss.jmx.server.RMIConnectorImpl) +- TopicConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef) +- UserTransactionSessionFactory (class: org.jboss.tm.usertx.server.UserTransactionSessionFactoryImpl) +- RMIXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- QueueConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef) +- topic (class: org.jnp.interfaces.NamingContext) | +- example (class: org.jboss.mq.SpyTopic) | +- testTopic (class: org.jboss.mq.SpyTopic) | +- bob (class: org.jboss.mq.SpyTopic) +- queue (class: org.jnp.interfaces.NamingContext) | +- D (class: org.jboss.mq.SpyQueue) | +- C (class: org.jboss.mq.SpyQueue) | +- loggingQueue (class: org.jboss.mq.SpyQueue) | +- B (class: org.jboss.mq.SpyQueue) | +- A (class: org.jboss.mq.SpyQueue) | +- controlQueue (class: org.jboss.mq.SpyQueue) | +- testQueue (class: org.jboss.mq.SpyQueue) | +- ex (class: org.jboss.mq.SpyQueue) | +- DLQ (class: org.jboss.mq.SpyQueue) | +- F (class: org.jboss.mq.SpyQueue) | +- E (class: org.jboss.mq.SpyQueue) +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) +- RMIConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction) +- jmx (class: org.jboss.jmx.server.JMXAdaptorImpl) +- servercollector (class: org.jboss.management.ServerDataCollector) +- UILXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- UILConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) I've copied the JNDI Properties to the tomcat/common/classes directory, and copied all the client JARS to the tomcat/classes/lib directory. Froma JSP running under Tomcat, I do a new InitialContext() and then do a lookup on "QueueConnectionFactory" I get: =20 javax.servlet.ServletException: Name QueueConnectionFactory is not bound in this Context at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:463) at org.apache.jsp.test_0005fjndi$jsp._jspService(test_0005fjndi$jsp.java:17 3) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) When i I do execute the following code: =20 Hashtable env =3D ctx.getEnvironment(); Enumeration enum =3D env.keys(); System.out.println("displayEnv number of keys "+env.size()); while (enum.hasMoreElements()) { String key =3D (String)enum.nextElement(); Object value =3D env.get(key); System.out.println(key+"=3D"+value); } I get: =09 java.naming.factory.initial=3Dorg.apache.naming.java.javaURLContextFactor= y java.naming.provider.url=3Dlocalhost:1099 =09 java.naming.factory.url.pkgs=3Dorg.apache.naming:org.jboss.naming:org.jnp= . interfaces =20 What am I doing wrong??? I've been banging my head against a wall for three days over this. Does anyone have any clues??? Oh, btw, I tried changing the JBoss JNDI port to 1066, but it made no difference. Thanks. =20 Andy Miller andy.miller@hp.com HP Invent ------_=_NextPart_001_01C20B1E.7456BA9A--