Chris, Alex,

Consider yourselves lucky...at least on a relative basis :).I've now logged 
around 7 hours on this problem and still no progress!  :((

I've tried every combination I can think of.  I have the following JAR 
files in my WAR file's WEB-INF/lib:
- ejb.jar
- jnp-client.jar
- jboss-client.jar
- jta-spec1_0_1.jar
- jaas.jar
- struts.jar (which is found with no problem, BTW)
- ejbpeopleClient.jar (contains all my application classes, servlet, and 
EJB interface classes)

In addition, I have tried putting my servlet and EJB interface files in 
either WEB-INF/lib (as a JAR) and WEB-INF/classes, to no avail.

My system classpath contains the following:

"D:\jakarta\dist\tomcat\lib\ant.jar;D:\jakarta\dist\tomcat\lib\jasper.jar;D:\jakarta\dist\tomcat\lib\jaxp.jar;D:\jakarta\dist\tomcat\lib\parser.jar;D:\jakarta\dist\tomcat\lib\servlet.jar;D:\jakarta\dist\tomcat\lib\webserver.jar;D:\ejbpeople\projects\build-app\conf;D:\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;D:\JBuilder4\jdk1.3\jre\lib\i18n.jar;D:\JBuilder4\jdk1.3\jre\lib\jaws.jar;D:\JBuilder4\jdk1.3\jre\lib\rt.jar;D:\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;D:\JBuilder4\jdk1.3\lib\dt.jar;D:\JBuilder4\jdk1.3\lib\tools.jar"

As you can see, I'm running this in JBuilder...

I have my jndi.properties file in D:\ejbpeople\projects\build-app\conf, 
which is on my system classpath.. The properties are read, but don't seem 
to work, so I set up the properties by creating a java.util.Properties 
object properly ,initialized before calling new InitialContext(props);

When I try to call context.lookup(), I keep getting:

Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
javax.naming.NoInitialContextException: Cannot instantiate class: 
org.jnp.interfaces.NamingContextFactory.  Root exception is 
java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory.

<Full exception trace below>

I just cannot figure out why NamingContextFactory is not found.  It's in 
jnp-client.jar, which is in my WEB-INF/lib directory of my WAR file.  I 
double checked, and I'm definitely using the right version JAR files from 
JBoss.  All of my application classes are at the same "level" - all in the 
WEB-INF/lib directory, except for the JAR files listed in my system 
classpath, above.  In fact, my servlet classes are in the same JAR as my 
EJB interface files, and the servlet classes are loaded and executed with 
no problem.  I cannot think of anything else to try...does anyone have any 
idea what I may have setup incorrectly, or how to further debug this problem?

Thanks very much for any help,

Rick Horowitz

The full exception trace follows:

Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
javax.naming.NoInitialContextException: Cannot instantiate class: 
org.jnp.interfaces.NamingContextFactory.  Root exception is 
java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory.
         at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
         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)
         at java.lang.Class.forName(Class.java:195)
         at 
com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
         at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:655)
         at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
         at javax.naming.InitialContext.init(InitialContext.java:222)
         at javax.naming.InitialContext.<init>(InitialContext.java:198)
         at 
com.ejbpeople.servlet.action.SaveSkillAction.getSkillHome(SaveSkillAction.java:181)
         at 
com.ejbpeople.servlet.action.SaveSkillAction.createSkill(SaveSkillAction.java:214)
         at 
com.ejbpeople.servlet.action.SaveSkillAction.perform(SaveSkillAction.java:143)
         at 
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1617)
         at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1427)
         at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:481)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
         at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:484)



Put all my servlet and EJB

At 05:55 PM 1/24/01 +0000, you wrote:
>Hi,
> >
> > We have jboss running on one machine and using standalone
> > java app clients
> > elsewhere, we can talk to it successfully.
> >
> > But when using tomcat we have to place the whole of the app and
> > jndi.properties in the main classpath of tomcat.  Is this
> > what other people
> > are doing?
> >
> > Basically, the client is not picking up the jndi.properties from the
> > WEB-INF/lib or classes directory - I guess the tomcat
> > classloader cannot
> > handler property files.
> >
>
>In fact even the putting it on the main classpath did not help - I just
>realised I have System.setProperty in my code to set the properties - I took
>this out and guess what - it cannot find java.naming.factory.initial.
>
>Regards,
>Chris
>
>================================================================================================
>This electronic message (email) and any attachments to it are subject to 
>copyright and are sent for the personal attention of the addressee. 
>Although you may be the named recipient, it may become apparent that this 
>email and its contents are not intended for you and an addressing error 
>has been made. This email may include information that is legally 
>privileged and exempt from disclosure. If you have received this email in 
>error, please advise us immediately and delete this email and any 
>attachments from your computer system.Rabobank International is the 
>trading name of Coöperatieve Centrale Raiffeisen-Boerenleenbank B.A. which 
>is incorporated in the Netherlands. Registered with the Registrar of 
>Companies for England & Wales No. BR002630 and regulated by the SFA for 
>the conduct of investment business in the UK.
>
>The presence of this footnote also confirms that this email has been 
>automatically checked by Rabobank International for the presence of 
>computer viruses prior to it being sent, however, no guarantee is given or 
>implied that this email is virus free upon delivery.
>
>
>
>
>--
>--------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>List Help?:          [EMAIL PROTECTED]

--------------------
Rick Horowitz


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to