Stan Ng wrote:
> 
> shouldn't the jboss client jars be in the tomcat lib directory since the
> tomcat classloader is the one executing the code?

Hum,

  No. From the doc, all jar files for a webapp should be copied in the
webapps/AppNam/WEB-INF/lib directory. It runs quite Ok, as, if Idon't
copy the jnp-client.jar file there ... The JSP just don't compile
(ClassNotFound exception).
  So the jnp jar file is correctly deployed.

  I still tried your idea. To run tomcat and my JSP without the
ClassNotFound exception, I had to update the startup file, and run it
directly (not as a service). But .. the trouble remain.
  But I did some tests on this subject. Tomcat is currently runned as a
service. Running it alone doesn't seem to change anything... I've also
tried to add a conf directory (at the same level as the lib one), with
all JBoss default configuration files. But nothing has changed ... It
was just a try.



A PRECISION :

If I don't start Jboss, I get this error :
"Connection refused: no further information"

  So, IMHO, jnp-client.jar is correctly deployed, but for some reason,
an error occured while instanciating the  NamingContextFactory.

Etienne


> 
> ----- Original Message -----
> From: "Etienne Gauthier" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 20, 2001 1:43 AM
> Subject: Re: [JBoss-user] Error getting InitialContext when running Tomcat
> separate from JBoss
> 
> >
> >
> >
> > 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
> 
> _______________________________________________
> 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

Reply via email to