NoSuchEntityException
sradford Sep 16, 2002 9:31 AMHi.
Any guesses as to why the JBoss 3 CMP engine is giving a NoSuchEntityException?
I am deleting an entity (that has a 1:1 relationship to another entity) and the log is showing (the remove of the entity is called from a session bean):
2002-09-16 13:19:04,229 DEBUG [uk.co.agora.hsbc.person.PersonManagerEJB] enter delete([26574])
2002-09-16 13:19:04,239 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Person.findById] Executing SQL: SELECT t0_p.PERSON_ID, t0_p.SURVEY_ID FROM PERSON t0_p WHERE t0_p.PERSON_ID = ?
2002-09-16 13:19:04,249 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.Person] Executing SQL: SELECT NAME, EMAIL, MANAGER, REVIEWER, PASSWORD, STATUS, COMPLETION_DATE, GRADE, ROLE, OFFICE_LOCATION, BUSINESS_NAME, BUSINESS_AREA FROM PERSON WHERE (PERSON_ID=? AND SURVEY_ID=?)
2002-09-16 13:19:04,259 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.Person] Executing SQL: SELECT GROUP_ID FROM SURVEY_GROUP_MEMBER WHERE (PERSON_ID=? AND SURVEY_ID=?)
2002-09-16 13:19:04,269 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.SurveyGroup] Executing SQL: SELECT SURVEY_ID, NAME FROM SURVEY_GROUP WHERE (GROUP_ID=?)
2002-09-16 13:19:04,269 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.SurveyGroup] Executing SQL: SELECT PERSON_ID, SURVEY_ID FROM SURVEY_GROUP_MEMBER WHERE (GROUP_ID=?)
2002-09-16 13:19:04,289 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCDeleteRelationsCommand.SurveyGroup] Executing SQL: DELETE FROM SURVEY_GROUP_MEMBER WHERE (GROUP_ID=? AND PERSON_ID=? AND SURVEY_ID=?)
2002-09-16 13:19:04,289 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCDeleteRelationsCommand.SurveyGroup] Rows affected = 1
2002-09-16 13:19:04,289 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.Person] Executing SQL: DELETE FROM PERSON WHERE PERSON_ID=? AND SURVEY_ID=?
2002-09-16 13:19:04,289 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.Person] Remove: Rows affected = 1
2002-09-16 13:19:04,299 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.Person] Executing SQL: SELECT NAME, EMAIL, MANAGER, REVIEWER, PASSWORD, STATUS, COMPLETION_DATE, GRADE, ROLE, OFFICE_LOCATION, BUSINESS_NAME, BUSINESS_AREA FROM PERSON WHERE (PERSON_ID=? AND SURVEY_ID=?)
2002-09-16 13:19:04,309 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
javax.ejb.NoSuchEntityException: Entity not found: primaryKey=[.26574.3000.]
at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:165)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:62)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:572)
at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:410)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:353)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:262)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:152)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:176)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:183)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:296)
at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
at $Proxy259.getId(Unknown Source)
at uk.co.agora.hsbc.person.PersonManagerEJB.dispatch109_delete(PersonManagerEJB.java;development/PublicLogger.java(1k);development/PrivateLogger.java(2k);production/LoggerAspect.java(3k):168)
at uk.co.agora.hsbc.person.PersonManagerEJB.around109_delete(PersonManagerEJB.java;development/PublicLogger.java(1k);development/PrivateLogger.java(2k);production/LoggerAspect.java(3k):1018)
at uk.co.agora.hsbc.person.PersonManagerEJB.delete(PersonManagerEJB.java;development/PublicLogger.java(1k);development/PrivateLogger.java(2k);production/LoggerAspect.java(3k):163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:664)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:176)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:183)
at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
at org.jboss.ejb.Container.invoke(Container.java:705)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
It seems to be carrying out the delete in the link table and the entity table, but then trys to load up the entity again - which of course it has just deleted and so can't find!
Any ideas will be MUCH appreciated?
I'm using JBoss-3.0.1RC1 (I suppose I should try 3.0.2)