Can someone please help me.
I am now using jboss-2.0-FINAL with embedded tomcat-3.2-b7 and jdk1.3 on
windows NT 4. (installed from the jboss_tomcat.zip)
I have auto deployed my app.ear file from the jboss deploy directory. I have
a servlet that is using ejb's. I get the following exception:
/***************************************************************************
****************************************************************************
*****************/
[EmbeddedTomcat] Exception in getting user info:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
[EmbeddedTomcat] userdata is null
[EmbeddedTomcat] Ctx( ): Exception in: R( + /servlet/SystemEntry + null)
java.lang.NullPointerException
at
net.citec.cms.servlet.login.SystemEntry.isCitecIp(SystemEntry.java:378)
at
net.citec.cms.servlet.login.SystemEntry.doGet(SystemEntry.java:74)
at
net.citec.cms.servlet.login.SystemEntry.doPost(SystemEntry.java:287)
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:79
9)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:745)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Unknown Source)
[Bean Cache] Resized cache for bean ejb/Client: old size = 1000, new size =
50
/***************************************************************************
****************************************************************************
*****************/
The servlet code looks as follows:
Context initial = new InitialContext();
Object objref = initial.lookup("ejb/User");
I have tried the following:
1. Putting jndi.properties in my jdk1.3\lib directory
2. Putting jndi.properties in my jdk1.3\jre\lib directory
3. Putting the jndi.properties in my classpath
4. Putting the individual entries in jndi.properties in my classpath
NONE OF THE ABOVE WORKS!
My collegue is using the exact same setup on Linux with jndi.properties in
his jdk1.3\jre\lib directory. That works.
The following code works for me:
environ = new Hashtable();
environ.put("one", new Integer(1));
environ.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
environ.put("java.naming.provider.url", "linda.berry.za.net");
environ.put("java.naming.factory.url.pkgs", "org.jboss.naming");
Context initial = new InitialContext(environ);
I am not keen to code this into all my servlets and JSP beans just for a
temporary solution.
Is this the only solution?
Isn't Tomcat supposed to read jndi.properties?
Why does it work on Linux???
Linda Berry
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]