java.util.concurrent.ExecutionException

java.lang.RuntimeException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection

Solutions on the web1671

  • via Google Groups by Unknown author, 6 months ago
    java.lang.RuntimeException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
  • org.hibernate.exception.GenericJDBCException: Cannot open connection
  • via hsqldb by hsetty
    , 1 year ago
    com.qr.data.processor.ProcessorException: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.NullPointerException
  • Stack trace

    • java.util.concurrent.ExecutionException: java.lang.RuntimeException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252) at java.util.concurrent.FutureTask.get(FutureTask.java:111) at javax.swing.SwingWorker.get(SwingWorker.java:596) at uk.gov.nationalarchives.droid.gui.worker.DroidJob.done(DroidJob.java:168) at javax.swing.SwingWorker$5.run(SwingWorker.java:731) at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:877) at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:887) at javax.swing.Timer.fireActionPerformed(Timer.java:293) at javax.swing.Timer$DoPostEvent.run(Timer.java:224) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226) at java.awt.EventQueue.dispatchEvent(EventQueue.java:602) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) Caused by: java.lang.RuntimeException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection at uk.gov.nationalarchives.droid.gui.worker.DroidJob.doInBackground(DroidJob.java:155) at uk.gov.nationalarchives.droid.gui.worker.DroidJob.doInBackground(DroidJob.java:60) at javax.swing.SwingWorker$1.call(SwingWorker.java:291) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at javax.swing.SwingWorker.run(SwingWorker.java:330) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:375) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at uk.gov.nationalarchives.droid.results.handlers.ResultHandlerImpl$$EnhancerByCGLIB$$8fa5af6d.handleDirectory(<generated>) at uk.gov.nationalarchives.droid.submitter.DirectoryEventHandler.onEvent(DirectoryEventHandler.java:72) at uk.gov.nationalarchives.droid.submitter.ProfileSpecWalkerImpl$2.handle(ProfileSpecWalkerImpl.java:116) at uk.gov.nationalarchives.droid.submitter.FileWalker.handleDirectoryStart(FileWalker.java:223) at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:353) at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:335) at uk.gov.nationalarchives.droid.submitter.FileWalker.walk(FileWalker.java:131) at uk.gov.nationalarchives.droid.submitter.ProfileSpecWalkerImpl.walk(ProfileSpecWalkerImpl.java:130) at uk.gov.nationalarchives.droid.profile.ProfileInstanceManagerImpl$WalkerTask.run(ProfileInstanceManagerImpl.java:264) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) ... 3 more Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41) at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:52) at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:330) ... 20 more Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353) at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38) ... 23 more Caused by: java.sql.SQLException: Data source is closed at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1362) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 28 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago