javax.persistence.PersistenceException: Unable to obtain JDBC Connection

Stack Overflow | Thomas Lann | 10 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Unable to get Web App to work with mysql 5.1 and wildfly 10

    Stack Overflow | 10 months ago | Thomas Lann
    javax.persistence.PersistenceException: Unable to obtain JDBC Connection
  2. 0

    NullPointerException trying to access EJB in JAX-RS controller

    Stack Overflow | 2 months ago | kalk
    javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.proj-EAR.ear.proj-WEB.war:main" from Service Module Loader [Root exception is java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "deployment.proj-EAR.ear.proj-WEB.war:main" from Service Module Loader]]: javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.proj-EAR.ear.proj-WEB.war:main" from Service Module Loader [Root exception is java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "deployment.proj-EAR.ear.proj-WEB.war:main" from Service Module Loader]]
  3. 0

    avoid including jms-client library in WebApplication Deployed in JBoss / Wildfly

    Stack Overflow | 3 weeks ago | Laura
    java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "deployment.myApp.war:main" from Service Module Loader]]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Problems migrate project from JDK 1.5 to JDK 1.7 & JBOSS 7.1

    Stack Overflow | 4 years ago | ksharma
    java.lang.ClassNotFoundException: org.josql.contrib.JoSQLJSPQueryTag from [Module "deployment.apm_ws_jboss7.war:main" from Service Module Loader]
  6. 0

    JBoss JPA trying to load non-entity class when setting up persistence context

    Stack Overflow | 2 years ago | fansonly
    java.lang.NoClassDefFoundError: javax/ws/rs/container/ContainerResponseFilter

  1. pbabcsany 2 times, last 4 months ago
  2. Andreas Häber 40 times, last 5 months ago
  3. andyglick 92 times, last 3 months ago
  4. DannyDBag 2 times, last 9 months ago
  5. MoYapro 2 times, last 2 months ago
3 more registered users
75 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.lang.ClassNotFoundException

    org.mysql.Driver from [Module "com.h2database.h2:main" from local module loader @5fcd892a (finder: local module finder @8b87145 (roots: C:\Users\tharper\Downloads\wildfly-10.0.0.Final\modules,C:\Users\tharper\Downloads\wildfly-10.0.0.Final\modules\system\layers\base))]

    at org.jboss.modules.ModuleClassLoader.findClass()
  2. JBoss Modules
    ConcurrentClassLoader.loadClass
    1. org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
    2. org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
    3. org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
    4. org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
    4 frames
  3. Java RT
    Class.forName
    1. java.lang.Class.forName0(Native Method)
    2. java.lang.Class.forName(Class.java:348)
    2 frames
  4. IronJacamar
    LocalManagedConnectionFactory.createManagedConnection
    1. org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:591)
    2. org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:318)
    3. org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:350)
    4. org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:285)
    4 frames
  5. IronJacamar
    AbstractConnectionManager.allocateConnection
    1. org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.createConnectionEventListener(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1319)
    2. org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:496)
    3. org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:626)
    4. org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:598)
    5. org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:590)
    6. org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:563)
    7. org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)
    7 frames
  6. IronJacamar
    WrapperDataSource.getConnection
    1. org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)
    1 frame
  7. JBoss Application Server: Connector Subsystem
    WildFlyDataSource.getConnection
    1. org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:66)
    1 frame
  8. org.hibernate.engine
    DatasourceConnectionProviderImpl.getConnection
    1. org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
    1 frame
  9. org.hibernate.jpa
    EntityManagerFactoryBuilderImpl.build
    1. org.hibernate.jpa.internal.schemagen.JpaSchemaGenerator$ConnectionProviderJdbcConnectionAccess.<init>(JpaSchemaGenerator.java:629)
    2. org.hibernate.jpa.internal.schemagen.JpaSchemaGenerator$ConnectionProviderJdbcConnectionAccess.<init>(JpaSchemaGenerator.java:620)
    3. org.hibernate.jpa.internal.schemagen.JpaSchemaGenerator.determineAppropriateJdbcConnectionContext(JpaSchemaGenerator.java:402)
    4. org.hibernate.jpa.internal.schemagen.JpaSchemaGenerator.access$100(JpaSchemaGenerator.java:55)
    5. org.hibernate.jpa.internal.schemagen.JpaSchemaGenerator$GenerationProcess.execute(JpaSchemaGenerator.java:113)
    6. org.hibernate.jpa.internal.schemagen.JpaSchemaGenerator.performGeneration(JpaSchemaGenerator.java:65)
    7. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:885)
    7 frames
  10. org.jboss.as
    TwoPhaseBootstrapImpl.build
    1. org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
    1 frame
  11. JPA
    PersistenceUnitServiceImpl$1$1.run
    1. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154)
    2. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)
    2 frames
  12. WildFly Security Manager
    WildFlySecurityManager.doChecked
    1. org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:667)
    1 frame
  13. JPA
    PersistenceUnitServiceImpl$1.run
    1. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182)
    1 frame
  14. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    3. java.lang.Thread.run(Thread.java:745)
    3 frames
  15. JBoss Threads
    JBossThread.run
    1. org.jboss.threads.JBossThread.run(JBossThread.java:320)
    1 frame