I hope someone can help, please.
I am running an application on Linux in Jboss 4 (with Tomcat 5) and using DB2Connect to run stored procedures. I can execute the stored procedure one time successfully. The next time I try to execute it (in the web app), I get this error:
1
8:44:32,862 ERROR [StudentDaoDB2Impl] Caught SQLException: java.sql.CallableStatement.executeQuery() was called but no result set was returned. Use java.sql.CallableStatement.executeUpdate() for non-queries.
If I use the jmx-console to flush the connection pool, or change the idle timeout to a shorter time and wait for it to time out, then I can use the stored procedures again. I've tried fooling around with holdability, auto commit, transaction isolation with no success. Auto commit returns true, holdability is HOLD_CURSORS_OVER_COMMIT and transaction isolation is READ_COMMITTED.
I appears that the connections are not being re-used maybe?
Here is my jdbc datasource:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>TestDS</jndi-name>
<connection-url>jdbc:db2:mydb2y</connection-url>
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>10</idle-timeout-minutes>
<max-pool-size>20</max-pool-size>
<min-pool-size>10</min-pool-size>
<!-- Use the security domain defined in conf/login-config.xml -->
<security-domain>TestDbRealm</security-domain>
</local-tx-datasource>
</datasources>
Any help is greatly appreciated.
Ken
