javax.persistence.PersistenceException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • JPA Query fails then connection is lost
    via Stack Overflow by Scott
    ,
  • getting errors needed to be clear
    via by Unknown author,
    • 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(Native Method) at java.lang.reflect.Method.invoke(Method.java:597)
    No Bugmate found.