tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chas <>
Subject jndi under tomcat3.x ? (deploying a tomcat4.x webapp on tomcat3.x server)
Date Thu, 01 Jan 1970 00:00:00 GMT
I've built my webapp using a JNDI datasource resource, running
on Tomcat4.  I had no problem setting up the JNDI environment. 

Now, I'm trying to run the webapp on a server which for one 
reason or another, has Tomcat3.3. Am finding that the JNDI setup
is not working, even though I simply deployed a war file (so 
web.xml should be correct) and copied over the server.xml config
from my development (Tomcat4) server. 

Then I checked
(yeah, perhaps I should have done that *before* trying to deploy <g>)
and don't see any JNDI reference.  Did Tomcat 3.x have JNDI support ?
The error messages (below) suggest so : 

% 2002-05-16 06:56:24 - Ctx( /myapp ): Exception in: R( /myapp +
/Lists/index.jsp + null) - javax.servlet.ServletException:
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

Given that I'm unable to upgrade to Tomcat4 (since it's running on 
a VPS - Virtual Private Server), will it be possible to run my
JNDI-dependent webapp on the Tomcat3 server ? 

Steps taken so far : 

1. Deployed the war file.

2. Added this to the server.xml : 

        <Context path="/myapp" docBase="myapp" reloadable="true">
          <Resource name="jdbc/mydb auth="Container"
                  <ResourceParams name="jdbc/mydb">

3. Copied the following files from <tomcat4_home>/common/lib
   to <tomcat3_home>/lib (since Tomcat3 does not /common/lib)

   - jdbc2_0-stdext.jar
   - mm.mysql-2.0.13-bin.jar

However, I notice that <tomcat3_home>/lib does not have the
naming-common.jar and naming-resources.jar, so I have a sneaky
feeling that I'm barking up the wrong tree... 



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message