Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
3.0
-
None
-
Mac OSX 10.4.8, JDK 1.5.0_06, Derby 10.2.2.0, Hessian 3.0.20, Jetty 5.1.12
Description
When using localObject to fault the PaymentIn object to a different context inside its postPersist() method, cayenne returns an object with a temporary id. The following stack trace is when trying to call the setStatus() method for PaymentIn to set the value for its status.
Full stack trace:
org.apache.cayenne.FaultFailureException: [v.3.0-SNAPSHOT Jan 19 2007 05:26:38] Error resolving fault for ObjectId: <ObjectId:PaymentIn, TEMP:0000045BFDE33E95> and state (hollow). Possible cause - matching row is missing from the database.
at org.apache.cayenne.BaseContext.prepareForAccess(BaseContext.java:106)
at org.apache.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:199)
at ish.oncourse.server.cayenne.glue.CayenneDataObject.writeProperty(CayenneDataObject.java:70)
at ish.oncourse.server.cayenne.glue._PaymentIn.setStatus(_PaymentIn.java:180)
at ish.oncourse.server.cayenne.PaymentIn.postPersist(PaymentIn.java:171)
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:585)
at org.apache.cayenne.map.CallbackOnEntity.performCallback(CallbackOnEntity.java:46)
at org.apache.cayenne.map.LifecycleEventCallbackMap.performCallbacks(LifecycleEventCallbackMap.java:150)
at org.apache.cayenne.map.LifecycleEventCallbackMap.performCallbacks(LifecycleEventCallbackMap.java:140)
at org.apache.cayenne.map.LifecycleEventCallbackMap.performCallbacks(LifecycleEventCallbackMap.java:140)
at org.apache.cayenne.map.LifecycleEventCallbackMap.performCallbacks(LifecycleEventCallbackMap.java:126)
at org.apache.cayenne.map.LifecycleEventCallbackMap.performCallbacks(LifecycleEventCallbackMap.java:162)
at org.apache.cayenne.intercept.SyncCallbackProcessor.apply(SyncCallbackProcessor.java:78)
at org.apache.cayenne.intercept.SyncCallbackProcessor.applyPostCommit(SyncCallbackProcessor.java:68)
at org.apache.cayenne.intercept.DataChannelCallbackInterceptor.onSync(DataChannelCallbackInterceptor.java:133)
at org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1153)
at org.apache.cayenne.access.DataContext.onContextFlush(DataContext.java:1111)
at org.apache.cayenne.access.DataContext.onSync(DataContext.java:1089)
at org.apache.cayenne.access.ClientServerChannel.onSync(ClientServerChannel.java:104)
at org.apache.cayenne.intercept.DataChannelDecorator.onSync(DataChannelDecorator.java:64)
at ish.oncourse.server.cayenne.ChannelTransactionDecorator.onSync(ChannelTransactionDecorator.java:48)
at org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:44)
at org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:151)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157)
at com.caucho.hessian.server.HessianServlet.service(HessianServlet.java:365)
at ish.oncourse.server.CayenneServlet.service(CayenneServlet.java:100)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)