Hi
I'm also getting this same error, and I'm using versions > 3.2.1:
Code:
2007-05-14 09:36:36.950 INFO org.hibernate.cfg.annotations.Version Hibernate Annotations 3.3.0.GA
2007-05-14 09:36:36.963 INFO org.hibernate.cfg.Environment Hibernate 3.2.2
...snip...
2007-05-14 09:36:37.038 INFO org.hibernate.ejb.Version Hibernate EntityManager 3.3.0.GA
Is there anything else I can try?
The entity I'm trying to lock is not null and all relationships are initialized. The code that throws the exception is as follows:
Code:
EntityManager em = [snip]
em.lock( entity, LockModeType.WRITE );
The em.lock() throws:
Code:
java.lang.NullPointerException
at org.hibernate.persister.entity.AbstractEntityPersister.lock(AbstractEntityPersister.java:1334)
at org.hibernate.event.def.AbstractLockUpgradeEventListener.upgradeLock(AbstractLockUpgradeEventListener.java:88)
at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:64)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:584)
at org.hibernate.impl.SessionImpl.lock(SessionImpl.java:576)
at org.hibernate.ejb.AbstractEntityManagerImpl.lock(AbstractEntityManagerImpl.java:376)
at [my calling code from this point down...]
Thanks
Darren