tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George M. Coles" <gco...@silverstream.com>
Subject null DataSource when trying to get JNDI InitialContext
Date Thu, 14 Feb 2002 20:53:17 GMT
Hi all,
	I am using tomcat for the firs time. I have v. 4.02, using jdk 1.4.

I am attempting to deploy my app, which uses JNDI to look up a connection
for its data access. I am using DB2 I have  placed the db2 jdbc zip file in
my WEB-INF/libs dir. My server.xml looks like this:

				<Context path="/pl" docBase="E:/projects/fa/fa" debug="5"
privileged="true">
					<Resource name="jdbc/PATHLINE" auth="Container"
type="javax.sql.DataSource" description="Pathline Database">
						<ResourceParams name="jdbc/PATHLINE">
							<parameter>
								<name>driverClassName</name>
								<value>COM/ibm/db2/jdbc/app/DB2Driver</value>
							</parameter>
							<parameter>
								<name>driverName</name>
								<value>jdbc:db2:PATHLINE</value>
							</parameter>
							<parameter>
								<name>user</name>
								<value>db2admin</value>
							</parameter>
							<parameter>
								<name>password</name>
								<value>password</value>
							</parameter>
						</ResourceParams>
					</Resource>
				</Context>


When I do my context lookup, which should return a DataSource, the
DataSource is null. I do not, however, get a naming exception, as I would
expect if the resource could not be found.

Has anyone had a similar experience? I am not quite knowlegeable enough
about JNDI or Tomcat to see where my problem is.

thanks,
George Coles


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message