From: Bill B. (JIRA) <jir...@jb...> - 2005-09-20 20:54:57
|
[ http://jira.jboss.com/jira/browse/EJBTHREE-290?page=3Dall ] =20 Bill Burke closed EJBTHREE-290: ------------------------------- Resolution: Done > EntityManager.refresh throws UnresolvableObjectException instead of Entit= yNotFoundException > -------------------------------------------------------------------------= ------------------ > > Key: EJBTHREE-290 > URL: http://jira.jboss.com/jira/browse/EJBTHREE-290 > Project: EJB 3.0 > Type: Bug > Versions: EJB 3.0 RC1 > Environment: XP pro > Reporter: Ortwin Gl=C3=BCck > Assignee: Bill Burke > Fix For: EJB 3.0 RC3 > > > Set transaction isolation to read-committed. > 1. read a persistent entity > 2. delete the row from the DB from another process > 3. refresh the entity > The EntityManager throws: > org.hibernate.UnresolvableObjectException: No row with the given identifi= er exists: [ch.logobject.test.model.TaskAlloc#686796] > at org.hibernate.UnresolvableObjectException.throwIfNull(Unresolv= ableObjectException.java:42) > at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(= DefaultRefreshEventListener.java:126) > at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(= DefaultRefreshEventListener.java:39) > at org.hibernate.impl.SessionImpl.refresh(SessionImpl.java:694) > at org.hibernate.ejb.AbstractEntityManagerImpl.refresh(AbstractEn= tityManagerImpl.java:160) > at org.jboss.ejb3.entity.InjectedEntityManager.refresh(InjectedEn= tityManager.java:112) > According to the EJB3 specs the entity manager should throw a EntityNotFo= undException. This should be an easy catch/wrap and rethrow fix. --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |