• Post Reply Bookmark Topic Watch Topic
  • New Topic

Acessing external JNDI namespace

 
Naveen Sampra
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help me with the following problem.

I need to access an external JNDI namespace from my web app. The external JNDI namespace is the embeded JNDI server of openJMS.
The server I am using is Test Server that comes with WSAD 5.1

I am getting error when I try to creat an IntialContext object from a Servlet.

I am using the following properties to create the InitialContext object.
java.naming.factory.initial=org.exolab.jms.jndi.InitialContextFactory
java.naming.provider.url=iiop://localhost:1099

I get the error:
Cannot instantiate class: org.exolab.jms.jndi.InitialContextFactory

The create of IntialContext factory works when I use a simple java class with a main(). I have set the openJMS library in my class path.

Why is it that I cannot create the InitialContext object.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to make sure the class or its JAR is in the correct place in your ejb-jar file when you deploy it. This is just a regular ClassNotFound exception, yes?
 
Jon Crowell
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same problem. Moreover, I have found people mentioning this problem, or something very similar, all over the place. If anyone has a solution, I would be grateful. More details here: http://forum.java.sun.com/thread.jspa?threadID=5306103
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!