tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Tomcat --> DB2 DBCP : authentication problem
Date Wed, 08 Jan 2003 14:35:05 GMT
I am trying to configure a connection from Tomcat 4.1.18 to DB2 7.2
FixPack5 (NT, local DB2 client), and receive the following error message
when trying to open a connection to the database:

[IBM][CLI Driver] SQL0567N "SYSTEM" is not a valid authorization ID.

The exception is thrown when trying to create the connection in the
following code:

javax.naming.InitialContext ctx = new javax.naming.InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource)envx.lookup
java.sql.Connection connection = ds.getConnection();

The resource definition in server.xml is as follows:

            <Resource name="jdbc/MyDB2" auth="Container" type

            <ResourceParams name="jdbc/MyDB2">

I have tried to connect using the same username and password by manually
creating a JDBC connection with the same driver (not using JNDI), and it
works fine:

con = DriverManager.getConnection( "jdbc:db2:SAMPLE", "db2admin",
"db2admin" );

 It seems that Tomcat does not send the correct credentials (the ones
defined in the resourceparams in server.xml) when trying to connect to DB2
(it seems to send "SYSTEM" rather than "db2admin"). I have installed the
necessary jakarta components for connection pooling and I have made the IBM
driver classes available in the $CATALINA_HOME/common/lib directory. Hence,
I suspect that the problem originates in the connection pooling part of

Have anyone experienced similar problems or have any idea about how to
solve this?

Any suggestions are greatly appreciated.


B | vidar kongsli, consultant
E | +47 982 19 329,
K | bekk consulting as, pb. 134 sentrum, 0102 oslo,
K |

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

View raw message