NullPointerException « Glassfish « JPA Q&A





1. JPA Error: java.lang.NullPointerException    java.net

Merge Data [TopLink Finer]: 2007.08.06 02:40:08.421--ServerSession(6597453)--Thread(Thread[AWT-EventQueue-0,6,main])--client acquired [TopLink Finest]: 2007.08.06 02:40:08.421--UnitOfWork(20238918)--Thread(Thread[AWT-EventQueue-0,6,main])--Merge clone with references Data Caught Exception: null java.lang.NullPointerException at oracle.toplink.essentials.internal.queryframework.CollectionContainerPolicy.iteratorFor(CollectionContainerPolicy.java:172) at oracle.toplink.essentials.internal.helper.WriteLockManager.traverseRelatedLocks(WriteLockManager.java:171) at oracle.toplink.essentials.internal.helper.WriteLockManager.acquireLockAndRelatedLocks(WriteLockManager.java:149) at oracle.toplink.essentials.internal.helper.WriteLockManager.checkAndLockObject(WriteLockManager.java:378) at oracle.toplink.essentials.internal.helper.WriteLockManager.traverseRelatedLocks(WriteLockManager.java:186) at oracle.toplink.essentials.internal.helper.WriteLockManager.acquireLockAndRelatedLocks(WriteLockManager.java:149) at oracle.toplink.essentials.internal.helper.WriteLockManager.acquireLocksForClone(WriteLockManager.java:89) at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.cloneAndRegisterObject(UnitOfWorkImpl.java:669) at oracle.toplink.essentials.internal.sessions.UnitOfWorkIdentityMapAccessor.getAndCloneCacheKeyFromParent(UnitOfWorkIdentityMapAccessor.java:167) at oracle.toplink.essentials.internal.sessions.UnitOfWorkIdentityMapAccessor.getFromIdentityMap(UnitOfWorkIdentityMapAccessor.java:105) at oracle.toplink.essentials.internal.sessions.IdentityMapAccessor.getFromIdentityMap(IdentityMapAccessor.java:310) at oracle.toplink.essentials.internal.sessions.MergeManager.registerObjectForMergeCloneIntoWorkingCopy(MergeManager.java:674) at oracle.toplink.essentials.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(MergeManager.java:411) at oracle.toplink.essentials.internal.sessions.MergeManager.mergeChanges(MergeManager.java:264) at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences(UnitOfWorkImpl.java:2723) at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.mergeCloneWithReferences(RepeatableWriteUnitOfWork.java:219) at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.mergeInternal(EntityManagerImpl.java:235) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.merge(EntityManagerImpl.java:128) at MainProgramManagement.ProgramMain.mergeData(ProgramMain.java:846) at MainProgramManagement.PersistenceDBManager.saveDataToDB(PersistenceDBManager.java:552) at

2. NullPointerException from Toplink while using Hibernate    java.net

As a side note, when I was trying to configure the datasources I was getting errors reported from Hibernate, not Toplink. As soon as those appeared to be fixed, I started getting the error below from Toplink. Also, the datasources do not appear in the JNDI view unless I disable then reenable them.

3. I get NullPointerException when I store a entity using JPA 2.    java.net

Local Exception Stack: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. Error Code: 0 Call: INSERT INTO BRANCHMEMBERITEM (ID, IDNUM, SUBNUM, ROWNUM, branch) VALUES (?, ?, ?, ?, ?) bind => [36053, 1122, 1122, 1, 36052] Query: InsertObjectQuery(company.domain.BranchMemberItem@775c77fb) at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:654) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:703) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:492) at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452) at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:690) at ...