[jboss-user] [JCA/JBoss] - Connection handle is not associated with the Managed Connect

ramkumar.k do-not-reply at jboss.com
Mon Jun 23 04:04:26 EDT 2008

Hi All,
   I am running my batch application in jboss 4.2.2. I am getting the below exception frequently though not every time i run the batch job. I am using spring 2.5.4 and spring-batch 1.0.1. My database is Mysql 5.1.23.

anonymous wrote : org.springframework.jdbc.UncategorizedSQLException : PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(*) FROM BATCH_JOB_EXECUTION WHERE JOB_EXECUTION_ID = ?]; SQL state [null]; error code [0]; Connection handle is not currently associated with a ManagedConnection; nested exception is java.sql.SQLException: Connection handle is not currently associated with a ManagedConnection

I am using HibernateTransactionManager (Hibernate 3.2) in my application.

This is my mysql-ds.xml
  |       <jndi-name>DarkDS</jndi-name>
  |       <connection-url>jdbc:mysql://</connection-url> 
  |       <driver-class>com.mysql.jdbc.Driver</driver-class>  
  |       <user-name>ou_user</user-name>
  | 	  <password>chi12#$</password> 
  |       <new-connection-sql>select 1 from dual</new-connection-sql>  
  |       <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
  |       <background-validation>true</background-validation>
  |       <min-pool-size>50</min-pool-size>
  |       <max-pool-size>50</max-pool-size>
  |      <prepared-statement-cache-size>500</prepared-statement-cache-size>
  |        <idle-timeout-minutes>5</idle-timeout-minutes>
  |        <exception-sorter-class-name> com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
  |         <valid-connection-checker-class-name> com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker </valid-connection-checker-class-name>
  | <connection-property name="useOldAliasMetadataBehavior">true</connection-property>
  |    </local-tx-datasource>

Do i need to change something in my ds.xml ? I checked the jboss documentation but i couldn't find any info on this issue

Any fixes?

Please let me know if you need more information from me. I badly need a fix for this.

thanks in advance,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159838#4159838

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159838

More information about the jboss-user mailing list