javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection

jboss.org | 7 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    [keycloak-user] db deadlock in concurrence environment

    jboss.org | 7 months ago
    javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
  2. 0

    C3P0 with hibernate configuration

    Stack Overflow | 10 months ago | Check
    javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
  3. 0

    Bug in production - connection to db

    GitHub | 1 year ago | acrepet
    javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin transaction failed:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate/Mysql, connection lost

    Stack Overflow | 11 months ago | L.Pascual
    org.springframework.security.authentication.InternalAuthenticationServiceException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 31,464 milliseconds ago. The last packet sent successfully to the server was 24 milliseconds ago.

Root Cause Analysis

  1. javax.persistence.PersistenceException

    org.hibernate.exception.GenericJDBCException: Could not open connection

    at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert()
  2. org.hibernate.jpa
    TransactionImpl.begin
    1. org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
    2. org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
    3. org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771)
    4. org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64)
    4 frames
  3. org.keycloak.connections
    JpaKeycloakTransaction.begin
    1. org.keycloak.connections.jpa.JpaKeycloakTransaction.begin(JpaKeycloakTransaction.java:22)
    1 frame
  4. org.keycloak.services
    DefaultKeycloakTransactionManager.enlist
    1. org.keycloak.services.DefaultKeycloakTransactionManager.enlist(DefaultKeycloakTransactionManager.java:25)
    1 frame
  5. org.keycloak.connections
    DefaultJpaConnectionProviderFactory.create
    1. org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:46)
    2. org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:30)
    2 frames
  6. org.keycloak.services
    DefaultKeycloakSession.getProvider
    1. org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)
    1 frame
  7. org.keycloak.models
    JpaUserProviderFactory.create
    1. org.keycloak.models.jpa.JpaUserProviderFactory.create(JpaUserProviderFactory.java:34)
    2. org.keycloak.models.jpa.JpaUserProviderFactory.create(JpaUserProviderFactory.java:16)
    2 frames
  8. org.keycloak.services
    DefaultKeycloakSession.getProvider
    1. org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)
    1 frame
  9. org.keycloak.models
    KeycloakModelUtils.findUserByNameOrEmail
    1. org.keycloak.models.cache.infinispan.DefaultCacheUserProvider.getDelegate(DefaultCacheUserProvider.java:50)
    2. org.keycloak.models.cache.infinispan.DefaultCacheUserProvider.getUserByUsername(DefaultCacheUserProvider.java:147)
    3. org.keycloak.models.UserFederationManager.getUserByUsername(UserFederationManager.java:180)
    4. org.keycloak.models.utils.KeycloakModelUtils.findUserByNameOrEmail(KeycloakModelUtils.java:246)
    4 frames
  10. org.keycloak.authentication
    AuthenticationProcessor.authenticateOnly
    1. org.keycloak.authentication.authenticators.directgrant.ValidateUsername.authenticate(ValidateUsername.java:47)
    2. org.keycloak.authentication.DefaultAuthenticationFlow.processFlow(DefaultAuthenticationFlow.java:155)
    3. org.keycloak.authentication.AuthenticationProcessor.authenticateOnly(AuthenticationProcessor.java:776)
    3 frames
  11. org.keycloak.protocol
    TokenEndpoint.build
    1. org.keycloak.protocol.oidc.endpoints.TokenEndpoint.buildResourceOwnerPasswordCredentialsGrant(TokenEndpoint.java:369)
    2. org.keycloak.protocol.oidc.endpoints.TokenEndpoint.build(TokenEndpoint.java:110)
    2 frames
  12. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor279.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:497)
    3 frames
  13. RESTEasy JAX-RS Implementation
    SynchronousDispatcher.invoke
    1. org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
    2. org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
    3. org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
    4. org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)
    5. org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:109)
    6. org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:135)
    7. org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)
    8. org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
    8 frames