About EntityManager

71-80 of 200Refresh
Forum
15

JPA - ExceptionInInitializerError when creating EntityManager

.EntityManagerFactoryImpl@ffa7e1 EntityManager emTemp = emf.createEntityManager(); TypedQueryEntityManager em = emf.createEntityManager();         try
Forum
15

EntityManager getMetamodel() causes crash

I am trying to track down some obscure errors with multi-threading.  This involved looking at the EntityManager Metamodel but this caused an ObjectDB exception.  So I reverted to your example code in ... ;drop" EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); MyEntity e1
Issue
15

DB persist operation results are not available for another Thread/EntityManager immdiately

Hello, we have following situation: The EntityManagerFactory is always opened and won't be closed. Thread A with its own EntityManager persists entities and commits the entities successfully. Thread B runs afterwards also with its own EntityManager and tries to load the persisted entities by
Forum
14

"No Persistence provider for EntityManager" in OSGI bundle.

provider for EntityManager named $objectdb/myDB.odb at javax.persistence.Persistence
Forum
14

EntityManager.merge gives EntityNotFoundException

Just started using objectdb (2.3.4). Calling EntityManager.merge for a new (non-managed) object gives EntityNotFoundException. I am perplexed by this. See attached test case. Thanks for your assistance. Full error output is: Exception in thread "main" [ObjectDB 2.3.4] javax.persistence
Forum
14

javax.persistence.PersistenceException: No Persistence provider for EntityManager named in Karaf 4.0.7 and OSGi DS test

.persistence.PersistenceException: No Persistence provider for EntityManager named objectdb://localhost:6136
Issue
14

InternalException during EntityManager.find()

InternalException during EntityManager.find()
Tutorial
13

Step 3: Define a Spring DAO Component

; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax ... connection: @PersistenceContext private EntityManager em; // Stores a new guest ... the controller, as shown in the next step. Prepares an EntityManager automatically and injects it into the em
Tutorial
13

Step 3: Define an EJB Session Bean

.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.TypedQuery ... : @PersistenceContext private EntityManager em; // Stores a new guest: public void persist(Guest guest ... shown in the next step). Prepares an EntityManager automatically and injects it into the em field
Tutorial
13

Step 3: Define a Spring DAO Component

.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence ... : @PersistenceContext private EntityManager em; // Stores a new guest: @Transactional ... the next step. Prepares an EntityManager automatically and injects it into the em field