org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:

coderanch.com | 3 months ago
  1. 0

    Problem at connection (Groovy forum at Coderanch)

    coderanch.com | 6 months ago
    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:
  2. 0

    Problem at connection (Groovy forum at Coderanch)

    coderanch.com | 3 months ago
    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:
  3. 0

    Strange things ;p

    GitHub | 4 years ago | freakyy85
    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 39,695,385 milliseconds ago. The last packet sent successfully to the server was 39,695,385 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    First login attempt fails: "...JDBC begin failed: "

    Google Groups | 4 years ago | Unknown author
    org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:
  6. 0

    Spring and Hibernate project throws JDBC exception every day

    Stack Overflow | 10 months ago | luca
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin transaction failed:

  1. kuldeep 4 times, last 2 months ago
  2. esaar 1 times, last 4 months ago
  3. mauritius 2 times, last 9 months ago
16 unregistered visitors
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. java.net.SocketException

    Broken pipe

    at java.net.SocketOutputStream.socketWrite0()
  2. Java RT
    BufferedOutputStream.flush
    1. java.net.SocketOutputStream.socketWrite0(Native Method)
    2. java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    3. java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    4. java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    5. java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    5 frames
  3. MySQL jdbc
    ConnectionImpl.setAutoCommit
    1. com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3333)
    2. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1971)
    3. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
    4. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619)
    5. com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4997)
    5 frames
  4. Commons DBCP
    PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit
    1. org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371)
    2. org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328)
    2 frames
  5. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:616)
    3 frames
  6. Spring Framework
    TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke
    1. org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:239)
    1 frame
  7. Unknown
    $Proxy14.setAutoCommit
    1. $Proxy14.setAutoCommit(Unknown Source)
    1 frame
  8. Hibernate
    JDBCTransaction.begin
    1. org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:91)
    1 frame
  9. Hibernate
    SessionImpl.beginTransaction
    1. org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
    1 frame
  10. Hibernate
    HibernateTransactionManager.doBegin
    1. org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:555)
    1 frame
  11. Grails
    GrailsHibernateTransactionManager.super$3$doBegin
    1. org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateTransactionManager.super$3$doBegin(GrailsHibernateTransactionManager.groovy)
    1 frame
  12. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor545.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:616)
    3 frames
  13. Groovy
    ScriptBytecodeAdapter.invokeMethodOnSuperN
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    3. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
    4. groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
    5. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127)
    5 frames
  14. Grails
    GrailsHibernateTransactionManager.doBegin
    1. org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateTransactionManager.doBegin(GrailsHibernateTransactionManager.groovy:32)
    1 frame
  15. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
    2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
    2 frames
  16. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:616)
    4 frames
  17. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:188)
    2. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    3. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    4. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    5. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    5 frames
  18. Grails
    HibernatePluginSupport$_addTransactionalMethods_closure22.doCall
    1. org.codehaus.groovy.grails.plugins.orm.hibernate.HibernatePluginSupport$_addTransactionalMethods_closure22.doCall(HibernatePluginSupport.groovy:502)
    1 frame
  19. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor543.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:616)
    3 frames
  20. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    3. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
    4. groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
    5. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    6. groovy.lang.Closure.call(Closure.java:282)
    7. org.codehaus.groovy.runtime.metaclass.ClosureStaticMetaMethod.invoke(ClosureStaticMetaMethod.java:59)
    8. org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)
    9. org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:88)
    10. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    11. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    12. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    12 frames
  21. org.codehaus.groovy
    GrailsUserDetailsService$loadUserByUsername.callCurrent
    1. org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService.loadUserByUsername(GormUserDetailsService.groovy:58)
    2. org.codehaus.groovy.grails.plugins.springsecurity.GrailsUserDetailsService$loadUserByUsername.callCurrent(Unknown Source)
    2 frames
  22. Groovy
    AbstractCallSite.callCurrent
    1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
    2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153)
    3 frames
  23. org.codehaus.groovy
    GormUserDetailsService.loadUserByUsername
    1. org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService.loadUserByUsername(GormUserDetailsService.groovy:76)
    1 frame
  24. Spring Security
    AbstractAuthenticationProcessingFilter.doFilter
    1. org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices.processAutoLoginCookie(TokenBasedRememberMeServices.java:110)
    2. org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices.autoLogin(AbstractRememberMeServices.java:91)
    3. org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:77)
    4. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    5. org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    6. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    7. org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
    7 frames
  25. org.codehaus.groovy
    RequestHolderAuthenticationFilter.doFilter
    1. org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:40)
    1 frame
  26. Spring Security
    FilterChainProxy$VirtualFilterChain.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    1 frame
  27. org.codehaus.groovy
    MutableLogoutFilter.doFilter
    1. org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:79)
    1 frame
  28. Spring Security
    FilterChainProxy.doFilter
    1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    2. org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    3. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    4. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    4 frames
  29. Spring
    DelegatingFilterProxy.doFilter
    1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    2 frames
  30. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    2 frames
  31. Grails
    GrailsWebRequestFilter.doFilterInternal
    1. org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
    1 frame
  32. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    1 frame
  33. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    2 frames
  34. Grails
    HiddenHttpMethodFilter.doFilterInternal
    1. org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
    1 frame
  35. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    1 frame
  36. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    2 frames
  37. Spring
    DelegatingFilterProxy.doFilter
    1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    3. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    4. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    4 frames
  38. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    8 frames
  39. Grizzly HTTP
    JIoEndpoint$Worker.run
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    3 frames
  40. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:636)
    1 frame