About EntityManager

151-160 of 200Refresh
Issue
2

[ObjectDB 2.2.6_02] Unexpected exception (Error 990) at com.objectdb.o.OBC.aJ(OBC.java:961)

.EntityExistsException; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory ... .createEntityManagerFactory("ReproducePU"); }   public EntityManager getEntityManager ... ) { EntityManager em = getEntityManager(); try { return em.find(MomentEntity.class, id
Forum
2

Visibility of changes in Transaction is not visible to a JPA QL Query

getInstance(EntityManager em) {   Singleton c = em.find(Singleton.class, "1");   if (c == null ... java.lang.Integer lastInstance; public void generateItems(EntityManager em, int howMany ... howManyItemsExist(EntityManager em) {   TypedQuery q = em.createQuery("SELECT COUNT(x) FROM Item x", Long
Forum
2

Cannot save or update entity on Spring App

: @PersistenceContext private EntityManager em; // Stores a new guest: @Transactional ... _NAME_ENTITYMANAGER_PACKAGES_TO_SCAN)); entityManagerFactoryBean.setJpaVendorAdapter(new ... ) { EntityManager em = entityManagerFactory.createEntityManager(); if (! em.getTransaction
Forum
2

Duplicate Entity class names causes Exception in Query

static Singleton getInstance(EntityManager em) { Singleton c = em.find(Singleton.class, "1 ... ; @Basic protected java.lang.Integer lastInstance; public void generateItems(EntityManager em, int ... Item findItem(EntityManager em, int which) { TypedQuery q = em.createNamedQuery("objdbTest
Forum
2

Empty temporary dat files in the temp folder

have a connection (open EntityManagerFactory). For each user action we create an EntityManager ... rollback the transaction and closing the EntityManager. In some scenarios we use additional databases as large data sink. And for optimized data access we hold the connection to the EntityManager. In
Forum
2

Null enums and IS (NOT) NULL: NullPointerException

") private EntityManager entityManager; public void persist(Object o) { try { transaction.begin(); entityManager.persist(o); transaction.commit ... { @PersistenceContext(unitName = "my-pu") private EntityManager entityManager; @EJB private TestManager
Issue
2

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

Account(); entityManager.persist(account); entityManager.flush(); Project project = new Project(); project.setAccount(account); entityManager.persist(project); entityManager.flush(); account = entityManager.find(account); assertNonNull(account.getProjects());   Expected Result
Forum
2

system exception occurred during an invocation on EJB GuestDao

: same problem (see below). How can I verify if the EntityManager has been successfully injected ? (statement : @PersistenceContext private EntityManager em) 2014-09-02T10:50:04.779+0200|Avertissement ... /EntityManager; at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate
Forum
2

Can't get arraylist/vector type attributes

get the object. But when I call the close method to close the EntityManager the information from ... the entitymanager I write something like vector.size() or I print it's size or I do anything with the vector ... objects are managed. i.e. when the EntityManager is open. When you close the EntityManager managed
Forum
2

Connection is closed Caused by: java.io.EOFException

an EntityManager.   I have checked throughout my code to ensure that  all instances of EntityManager ... .createEntityManager();         }     } } Notice that the EntityManager instances ... if your application might create EntityManager instances without closing them. By the way, following your report