hi james, Thanks for the advise..I changed it lower-case queue but now get.. java.lang.ClassCastException: javax.naming.Reference at com.bms.ecp.oms.jms.ManualJNDI.main(ManualJNDI.java:59) any ideas??
-----Original Message----- From: Jim Birchfield [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 11:07 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [JBoss-user] JNDI in Jboss Try ' Queue t = (Queue)context.lookup("queue/testQueue"); ' Notice the lower case q... James Birchfield Development Manager Genscape, Inc. (502) 583-2298 (o) (502) 639-3136 (c) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 1:57 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] JNDI in Jboss hi all, I get the following error .... javax.naming.NameNotFoundException: Queue not bound at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC all.java:245) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333) at javax.naming.InitialContext.lookup(InitialContext.java:350) at com.bms.ecp.oms.jms.ManualJNDI.main(ManualJNDI.java:59) when I run the-code below though I have all the jar files in my classpath. do I have to start anyservice or something to get JNDI working in JBOSS-- any help is highly appreciated. regard sri public class ManualJNDI { /** * Get an initial context for JBoss JNDI (localhost:1099) */ public static Context getInitialContext() throws NamingException{ // Populate with needed propertis Hashtable props = new Hashtable(); props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); props.put(Context.PROVIDER_URL, "localhost:1099"); props.put("java.naming.rmi.security.manager", "yes"); props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming"); // Get initial context with given properties return new InitialContext(props); } /** * Test looking up a known topic, if no errors JNDI works. */ public static void main(String[] args) { try { // Get the manually configured initial context Context context = ManualJNDI.getInitialContext(); Logger.log("a"); // Do the lookup Queue t = (Queue)context.lookup("Queue/testQueue"); Logger.log("b"); System.out.println("Looing up topic/testTopic worked fine"); }catch (Exception ex) { System.err.println("Could not lookup topic/testTopic"); ex.printStackTrace(); } } } // ManualJNDI _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user