Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Ali
, 2 years ago
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
via Stack Overflow by manish
, 2 years ago
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed:
via openmeetings-user by Lee Saunders, 1 year ago
Could not open JPA EntityManager for transaction; nested exception is <openjpa-2.2.2-r422266:1468616 fatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)
via Oracle Community by 885196, 1 year ago
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28013] (Eclipse Persistence Services - 2.0.2.v20100323-r6872
via Oracle Community by 885196, 1 year ago
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28013] (Eclipse Persistence Services - 2.0.2.v20100323-r6872
via Oracle Community by 885196, 1 year ago
Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28013] (Eclipse Persistence Services - 2.0.2.v20100323-r6872
java.net.ConnectException: Connection refused	at java.net.PlainSocketImpl.socketConnect(Native Method)	at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)	at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)	at java.net.SocksSocketImpl.connect(Unknown Source)	at java.net.Socket.connect(Unknown Source)	at java.net.Socket.connect(Unknown Source)	at java.net.Socket.(Unknown Source)	at java.net.Socket.(Unknown Source)	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:259)	at com.mysql.jdbc.MysqlIO.(MysqlIO.java:300)	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2408)	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2253)	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2235)	at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:813)	at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)	at java.lang.reflect.Constructor.newInstance(Unknown Source)	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)	at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)	at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)	at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)	at org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:110)	at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:87)	at org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary(DBDictionaryFactory.java:91)	at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:603)	at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1510)	at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:518)	at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:443)	at org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:104)	at org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)	at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)	at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:968)	at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:959)	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:337)	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:325)	at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:228)	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212)	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)	at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:445)	at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:366)	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)	at org.openmeetings.app.data.basic.Sessionmanagement$$EnhancerByCGLIB$$62325b28.clearSessionTable()	at org.openmeetings.app.quartz.scheduler.SessionClearJob.doIt(SessionClearJob.java:36)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)	at java.lang.reflect.Method.invoke(Unknown Source)	at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)	at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:311)	at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113)	at org.quartz.core.JobRunShell.run(JobRunShell.java:216)	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)