I hope someone can help. 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 (use the connection) one time successfully. The next time I try to execute it (DAO), I get this error:
18: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 connection successfully again. If I don't close the connection, it picks up the next one and uses it successfully. I am closing everything properly (CallableStatement, ResultSet and Connection at the end of the DAO). The DAO is instantiated new one time when a session is created and then released. If I set autoCommit to false then rollback before closing the connection, It seems to work fine. But this will only work for r/o stored procedures. I appears that the connections are not being re-used maybe? Here is my jdbc datasource: <?xml version="1.0" encoding="UTF-8"?> <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> The ResultSet if TYPE_FORWARD_ONLY, CONCUR_READ_ONLY, HOLD_CURSORS_OVER_COMMIT. I can't change to a scrollable RS - it gets ignored in the code. Thanks in advance for any help that can be given. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912503#3912503 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912503 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
