I was missing jbossmq-client.jar from the classpath.
Why was there no ClassNotFoundException thrown instead?
m.
-----Original Message-----
From: Michael Hustler [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 5:41 PM
To: Jboss (E-mail)
Subject: [JBoss-user] ClassCastException thrown during Context.lookup()
Hi,
can anyone tell me what I am doing wrong in this code block?
I am trying to establish a connection to a topicConnectionFactory from
within my client. Executing the code block results in a ClassCastException
during the lookup() call.
Properties env = new Properties();
env.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:1099");
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
jndiContext = new InitialContext(env);
topicConnectionFactory = (TopicConnectionFactory)
jndiContext.lookup("TopicConnectionFactory");
Thanks!
mike.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user