13 Replies Latest reply: Jun 8, 2012 1:07 PM by newToplinkUser RSS

    OptimisticLockException.getObject returns null

    newToplinkUser
      a NPE is thrown when we try to access the object, Eclipselink 2.3.3, is this a known issue? Thanks

      java.lang.NullPointerException: null
      at
      org.eclipse.persistence.exceptions.OptimisticLockException.getObject(OptimisticLockException.java:65)
      at
      com.integral.persistence.PersistenceFactory.handleException(PersistenceFactory.java:1010)
      at
      org.eclipse.persistence.internal.sessions.AbstractSession.handleException(AbstractSession.java:2739)
      at
      org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1561)
      at
      org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
      at
      org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1449)
      at
      org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:224)
      at
      org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:191)
      at
      org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:136)
      at
      org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3799)
      at
      org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1415)
      at
      org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1505)
      at
      org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1325)