Hi all,
I've exactly the same trouble with :
- NT Workstation 4.0, SP5
- jdk 1.3
- tomcat 3.2.1
- JBoss 2.2 (in a separate JVM)
Everything works fine while executing directly the code (I mean not from
a JSP file). But if I execute it from tomcat, I've the same error.
The file jnp-client.jar is in the correct WEB-INF\lib. It contains the
class file for org.jnp.interfaces.NamingContextFactory. I've tried to
suppress the jboss-client.jar and jbosssx-client.jar from this
directory, to test it : I then get another error, which means to me that
the directory is definitively the good one.
But the jnp-client.jar doesn't seem to be loaded, or another jar file
is needed. I've copied all files from jboss/client to my WEB-INF\lib
directory, with no more success.
I just get the 'Cannot instantiate class:
org.jnp.interfaces.NamingContextFactory' exception, although my code
executes successfully this line :
org.jnp.interfaces.NamingContextFactory ncf = new
org.jnp.interfaces.NamingContextFactory ();
Which means that it CAN actually instanciate
org.jnp.interfaces.NamingContextFactory, at least with the default
constructor.
Etienne
James Cook wrote:
>
> The key jar file is jnp-client.jar and the key directory to place it is
> <webapp>/WEB-INF/lib. Looks like one of these is not happening.
>
> jim
>
> ----- Original Message -----
> From: "Brett Palmer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 5:59 PM
> Subject: [JBoss-user] Error getting InitialContext when running Tomcat separate
> from JBoss
>
> > We are having problems connecting to a JBoss EJB from a servlet when running
> > Tomcat in its own JVM. The error occurs when we try to get an
> > InitialContext, and we get a org.jnp.interfaces.NamingContextFactory class
> > not found exception. I believe we have put all the necessary Jboss
> > libraries in the "webapps/myapp/lib" directory. This error does not occur
> > when we try to access the EJB from a regular test client (JUnit test) or
> > when we run Tomcat embedded with JBoss. The following is an output of our
> > error. Any suggestions would be greatly appreciated.
> >
> > Thanks,
> >
> > Brett
> >
> >
> > 28491 [Thread-7] INFO - get new ContainerContext()
> > 28521 [Thread-7] INFO ContainerContext - ContainerContext - Getting
> > TheUserSesion
> > 28541 [Thread-7] ERROR ContainerContext - ContainerContext - Error with
> > connect()
> > javax.naming.NoInitialContextException: Cannot instantiate class:
> > org.jnp.interfaces.NamingContextFactory. Root exception is
> > java.lang.ClassNotFoundException:
> > org.jnp.interfaces.NamingContextFactory
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> > at java.lang.Class.forName0(Native Method)
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user