1 Reply Latest reply on Apr 8, 2004 2:28 PM by jchang

    newbie question : Store command NOT executed. Entity is not

    jchang

      Hello everybody,

      This is my situation, I am doing some testing to my application and for some reason sometimes the creation of a new record to the database by an entity bean is not being processed correctly.

      I have lots of debugging statements turn on and I can see that a specific record is being created by the entity bean but some lines after, this message appears:


      Store command NOT executed. Entity is not dirty: pk=671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f


      Which I think it means that the method that stores the data to the db has not been executed.
      Later on other messages get print out by a different thread:

      Store command NOT executed. Entity is not dirty: pk=671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f
      (Thread-38:) Executing SQL: DELETE FROM attendance WHERE id=?
      (Thread-38:) Set parameter: index=1, jdbcType=VARCHAR, value=671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f


      and then this happens:


      (Thread-38:) Removing cached data for 671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f
      (Thread-39:) RESET PERSISTENCE CONTEXT: id=671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f
      ins.cmp.jdbc.ReadAheadCache.Attendance] (Thread-39:) load data: entity=Attendance pk=671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f
      ins.cmp.jdbc.ReadAheadCache.Attendance] (Thread-39:) No preload data found: entity=Attendance pk=671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f
      ins.cmp.jdbc.JDBCLoadEntityCommand.Attendance] (Thread-39:) Default eager-load for entity: readahead=null
      ins.cmp.jdbc.JDBCLoadEntityCommand.Attendance] (Thread-39:) Executing SQL: SELECT conference_id, member_id, group_id, timeslot_id FROM attendance WHERE (id=
      ins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.Attendance.id] (Thread-39:) Set parameter: index=1, jdbcType=VARCHAR, value=671d0d-fbcb6cd523-b88d8e8d57a53bc420279


      which then throws this error

      javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=671d0d-fbcb6cd523-b88d8e8d57a53bc420279153d2e46f6f
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:158)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
      at org.jboss.ejb.Container.invoke(Container.java:674)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
      at $Proxy313.getAttendanceVO(Unknown Source)
      at com.ideal.gm2.attend.AttendanceFacadeBean.findAttendance(AttendanceFacadeBean.java:367)
      at com.ideal.gm2.attend.AttendanceFacadeBean.addAttendance(AttendanceFacadeBean.java:157)
      at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source)
      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:629)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
      at org.jboss.ejb.Container.invoke(Container.java:674)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
      at $Proxy307.addAttendance(Unknown Source)
      at com.ideal.gm2.web.servlet.MeetingSelectServlet.doGet(MeetingSelectServlet.java:71)
      at com.ideal.gm2.web.servlet.BaseHttpServlet.doPost(BaseHttpServlet.java:111)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:534)


      Do you have an idea why this will be happening. It seems that another thread is deleting the entity bean. but I have not code that could delete this entity.
      Also, why would it say that Store command Not executed. Entity is not dirty.

      Thanks in advance for your help

      jchang