javax.persistence.PersistenceException: Exception [EclipseLink-4002] > (Eclipse > Persistence Services - 2.3.0.v20110604-r9504): > org.eclipse.persistence.exceptions.DatabaseException Internal Exception: > java.sql.SQLException: Error in allocating a connection. Cause: > java.lang.IllegalStateException: Local transaction already has 1 non-XA > Resource: cannot add more resources. Error Code: 0 at > org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:501) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:275) > > at > com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:208) > > at > com.sun.enterprise.container.common.impl.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:532) > > at > com.mycomp.myapp.ejb.ApplicationBean.postContructInitialization(ApplicationBean.java:102) > >

Oracle Community | groverblue | 5 years 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

    [SOLVED] Deploying EAR fails on Singleton initialization with "create-tables" configuration

    Oracle Community | 5 years ago | groverblue
    javax.persistence.PersistenceException: Exception [EclipseLink-4002] > (Eclipse > Persistence Services - 2.3.0.v20110604-r9504): > org.eclipse.persistence.exceptions.DatabaseException Internal Exception: > java.sql.SQLException: Error in allocating a connection. Cause: > java.lang.IllegalStateException: Local transaction already has 1 non-XA > Resource: cannot add more resources. Error Code: 0 at > org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:501) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:275) > > at > com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:208) > > at > com.sun.enterprise.container.common.impl.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:532) > > at > com.mycomp.myapp.ejb.ApplicationBean.postContructInitialization(ApplicationBean.java:102) > >
  2. 0

    JPA Query fails then connection is lost

    Stack Overflow | 6 years ago | Scott
    javax.persistence.PersistenceException: org.hibernate.MappingException: Unknown entity: org.myprogram.entity.MisCollVariableValue 11:25:11,129 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) 11:25:11,129 ERROR [STDERR] at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76) 11:25:11,129 ERROR [STDERR] at org.myprogram.dataloader.DataValidator.validateInputRules(DataValidator.java:444) 11:25:11,129 ERROR [STDERR] at org.myprogram.dataloader.DataValidator.methodThatCallsThePrivateOne(DataValidator.java:124) 11:25:11,129 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:25:11,129 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 11:25:11,129 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 11:25:11,129 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) 11:25:11,129 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) 11:25:11,129 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  3. 0

    getting errors needed to be clear

    javaprogrammingforums.com | 2 years ago
    javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.marcos.model.Ciudad.id at org.hibernate.ejb.AbstractEntityManagerImpl.throwP ersistenceException(AbstractEntityManagerImpl.java :614) at org.hibernate.ejb.AbstractEntityManagerImpl.merge( AbstractEntityManagerImpl.java:244) at org.jboss.ejb3.entity.ExtendedEntityManager.merge( ExtendedEntityManager.java:106) at com.marcos.model.PaisFacade.update(PaisFacade.java :83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    org.hibernate.exception.GenericJDBCException: Cannot open connection (Object Relational Mapping forum at Coderanch)

    coderanch.com | 9 months ago
    javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection 15:45:24,328 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) 15:45:24,328 ERROR [STDERR] at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76) 15:45:24,328 ERROR [STDERR] at cdac.nroa.sessions.CorporateElementsFacade.findCorpIdByElementId(CorporateElementsFacade.java:182) 15:45:24,328 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  6. 0

    Hibernate Community • View topic - hibernate Exce..GenericJDBCException: Cannot open coonection

    hibernate.org | 2 years ago
    javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection 15:45:24,328 ERROR [STDERR]         at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) 15:45:24,328 ERROR [STDERR]         at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76) 15:45:24,328 ERROR [STDERR]         at cdac.nroa.sessions.CorporateElementsFacade.findCorpIdByElementId(CorporateElementsFacade.java:182) 15:45:24,328 ERROR [STDERR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    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. javax.persistence.PersistenceException

      Exception [EclipseLink-4002] > (Eclipse > Persistence Services - 2.3.0.v20110604-r9504): > org.eclipse.persistence.exceptions.DatabaseException Internal Exception: > java.sql.SQLException: Error in allocating a connection. Cause: > java.lang.IllegalStateException: Local transaction already has 1 non-XA > Resource: cannot add more resources. Error Code: 0 at > org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:501) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290) > > at > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:275) > > at > com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:208) > > at > com.sun.enterprise.container.common.impl.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:532) > > at > com.mycomp.myapp.ejb.ApplicationBean.postContructInitialization(ApplicationBean.java:102) > >

      at sun.reflect.NativeMethodAccessorImpl.invoke0()
    2. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:597)
      2 frames