org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into ....]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement

Spring JIRA | Alex | 3 years ago
  1. 0

    I'm developing an application that uses spring social to integrate with facebook application. My data layer is using spring data jpa and a usual LocalContainerEntityManagerFactoryBean. The problem is that every transactional method that actively uses the facebook connection can't be executed because the JdbcConnectionRepository that uses the same datasource closes the connection and hence everything fails. The Exception raised is: [org.springframework.transaction.interceptor.TransactionInterceptor.completeTransactionAfterThrowing:408] Application exception overridden by rollback exception org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into ....]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651) ... Caused by: org.hibernate.exception.GenericJDBCException: could not prepare statement at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) ... Caused by: java.sql.SQLException: Connection is closed. at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOpen(PoolingDataSource.java:185) As a workaround I created a new connection pooler using a duplicate datasource, but it's a worthless complication and an integration with the usual transaction mechanism managed by spring would be ideal.

    Spring JIRA | 3 years ago | Alex
    org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into ....]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement
  2. 0

    I'm developing an application that uses spring social to integrate with facebook application. My data layer is using spring data jpa and a usual LocalContainerEntityManagerFactoryBean. The problem is that every transactional method that actively uses the facebook connection can't be executed because the JdbcConnectionRepository that uses the same datasource closes the connection and hence everything fails. The Exception raised is: [org.springframework.transaction.interceptor.TransactionInterceptor.completeTransactionAfterThrowing:408] Application exception overridden by rollback exception org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into ....]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651) ... Caused by: org.hibernate.exception.GenericJDBCException: could not prepare statement at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) ... Caused by: java.sql.SQLException: Connection is closed. at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOpen(PoolingDataSource.java:185) As a workaround I created a new connection pooler using a duplicate datasource, but it's a worthless complication and an integration with the usual transaction mechanism managed by spring would be ideal.

    Spring JIRA | 3 years ago | Alex
    org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into ....]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement
  3. 0

    How to return a single result from Spring-Data-JPA?

    Stack Overflow | 3 years ago | Eric B.
    org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [90016]; error code [90016]; could not extract ResultSet; nested exception is org.hibernate.exception.GenericJDBCException: could not extract ResultSet
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to get the original error from a failing JUnit test?

    Stack Overflow | 3 years ago | user1071914
    org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into CAACCTS (CREDIT_APPLICATION_ID, PRIMARY_ACCOUNT_NUMBER, SECONDARY_ACCOUNT_ID, SECONDARY_ACCT_NAME, SECONDARY_ADDY_ID, SECONDARY_ACCOUNT_NUMBER) values (?, ?, ?, ?, ?, ?)]; SQL state [null]; error code [0]; Could not execute JDBC batch update; nested exception is org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
  6. 0

    How can I automatically clear a MySQL INNODB transaction lock when a transaction timeout exception is thrown?

    Stack Overflow | 2 years ago | Dave
    org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [41000]; error code [1205]; Lock wait timeout exceeded; try restarting transaction; nested exception is org.hibernate.exception.GenericJDBCException: Lock wait timeout exceeded; try restarting transaction

  1. linxiaolong 4 times, last 3 weeks ago
  2. Piz 1 times, last 5 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.orm.hibernate3.HibernateJdbcException

    JDBC exception on Hibernate data access: SQLException for SQL [insert into ....]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement

    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException()
  2. Hibernate
    SessionFactoryUtils.convertHibernateAccessException
    1. org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651)
    1 frame