tomcat 5.0.28 with DB2 V9.

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
dstafford
Posts: 7
Joined: Mon Aug 28, 2006 4:07 pm

tomcat 5.0.28 with DB2 V9.

Post by dstafford »

I am receiving a problem with Tomcat 5.0.28 trying to use the DB2 V9 JDBC drivers. I am receiving an error 'jdbc not bound in this context'. All we did was migrate from the db2 v8 drivers to the v9 drivers.

There are no other errors that I can locate. Any thoughts or experiences in configurating the V9 Db2 drivers?

context in the 'conf/Catalina/localhost' directory: <?xml version='1.0' encoding='utf-8'?>
<Context displayName="mygreat-app" docBase="tomcatapp" path="/dirmgt" workDir="work/Catalina/localhost/dirmgt" reloadable="true">
<ResourceLink global="jdbc/db2conn" name="jdbc/conn" type="com.ibm.db2.jcc.DB2DataSource" />
</Context>

server.xml contains the following:

<Resource type="com.ibm.db2.jcc.DB2DataSource" name="jdbc/db2conn"/>
<ResourceParams name="jdbc/db2conn">
<parameter>
<name>factory</name>
<value>com.ibm.db2.jcc.DB2DataSourceFactory</value>
</parameter>
<parameter>
<name>database</name>
<value>DBV9</value>
</parameter>
<parameter>
<name>type</name>
<value>2</value>
</parameter>
<parameter>
<name>password</name>
<value>MYPWD</value>
</parameter>
<parameter>
<name>user</name>
<value>MYUSER</value>
</parameter>

<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
</ResourceParams>

The error that gets posted in the STDOUT is basically this:

SystemUnavailableException
at .....DbConnector.connect
followed by the remainder of the stack dump and the followed by this:


Caused by: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:361)


Any thoughts you have on this would be appreciated.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Has the classpath been updated to point to the new version of DB2?

Also, you should run the JDBC IVPs to ensure that JDBC has been customized properly for DB2 V9. There is a big README in the DB2 directory that has the customization steps.
dstafford
Posts: 7
Joined: Mon Aug 28, 2006 4:07 pm

Post by dstafford »

Yes, the Class path, the lib path and the STEPLIB have all been configured to point to DB2 V9 libraries / directory structures.

The IVP steps have been run and the 'batch' java jdbc test program has successfully been executed.

According to the README, this should be a 'point to the new libraries / class files and you are good to go' sort of upgrade. However the lack of the JDNI binding confuses me.
Post Reply