Call DB2 stored procedure using IBM's DB2 NET driver on Tomcat 4.0 using connection pool
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Xiaofeng_Chen
Posted On:   Thursday, August 15, 2002 02:09 PM

I created a standalone Java program with JDBC 2.0 driver from IBM to call a stored procedure on a DB2 database. It works fine. But when I tried to call the same stored procedure in a servlet running in tomcat 4.0 environment with a DataSource defined, I got a DB2 exception of "no such function name with desired parameters...". After I created a connection using the following way: Connection con = DriverManager.getConnection(dbURL, user, password) then call the stored procedure using CallableStatement, e verything works fine. Anyone has clues about what's wrong with the connection obtained from a DataSour   More>>

I created a standalone Java program with JDBC 2.0 driver
from IBM to call a stored procedure on a DB2 database.
It works fine. But when I tried to call the same
stored procedure in a servlet running in tomcat 4.0
environment with a DataSource defined, I got a DB2
exception of "no such function name with desired
parameters...". After I created a connection using the
following way:



Connection con = DriverManager.getConnection(dbURL, user,
password)



then call the stored procedure using CallableStatement, e
verything works fine.




Anyone has clues about what's wrong with the
connection obtained from a DataSource defined in
server.xml of Tomcat 4.0. There is no problem to
execute SQL query through a db2 connection obtained
from a DataSource object.



Thanks in advance.



Xiaofeng Chen

   <<Less

Re: Call DB2 stored procedure using IBM's DB2 NET driver on Tomcat 4.0 using connection pool

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, August 15, 2002 02:29 PM

Could it be that the one that's failing (using the connection pool) is logging in as a different database user? Are you specifying the stored procedure with the schema/owner name prefixing it, so the name is independent of the actual logged in database user?

About | Sitemap | Contact