Caused by: java.lang.NullPointerException: null
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:978) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:286) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:852) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:751) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2875) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1602) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1584) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1535) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:265) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:128) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3914) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1419) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:634) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1509) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:266) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1147) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84) ~[eclipselink-2.4.1.jar:2.4.1.v20121003-ad44345]
... 73 common frames omitted

It happens via one of the controller methods and is quite reproducible. Is there a known reason and possibly a workaround for it?
How can I help identifying and fixing it?
Unfortunately it happens only on server, I was not able to reproduce it locally.