I'm using castor as the OR mapping layer for a server that stores a set of business objects. Clients use SOAP to access my server which then uses JDO to read and update them.
Recently I got this persistence exception, below. Notice that it is claiming a deadlock has been detected. The error below is wrapped in a SOAP fault and the castor stack frames are near the beginning of the trace. I have a couple of questions: How does Castor determine a deadlock? Is this a deadlock within Castor or from the DBMS? (I'm using Hypersonic if it makes a difference) Notice it comes at commit time. The operation "getAllObject" opens a transaction *reads* a set of objects, and then commits. Why is this a deadlock? Why is one of the JDO stack frames "upgrade"? If it upgrading the lock to write, why is it doing this for a read? Do I need to do something special to tell JDO that the transaction will be readonly? Should I have used long transactions? I get the impression that it takes a bit of work to get one's objects into shape for long transactions so I haven't looked into it (something about implementing a number of interfaces if I recall) Thanks -Brian <?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > <soap:Body > <soap:Fault > <faultcode >Internal</faultcode> <faultstring >Exception in Agreements getAllObjectscall</faultstring> <detail > <ap:faultException xmlns="http://namespace.amberpoint.com/amf" xmlns:ap="http:// namespace.amberpoint.com/amf" > <ap:exceptionString xmlns="http://namespace.amberpoint.com/amf" xmlns:ap="http:/ /namespace.amberpoint.com/amf" >org.exolab.castor.jdo.TransactionAbortedExceptio n: Nested error: org.exolab.castor.jdo.LockNotGrantedException: persist.deadlock <ap:stackTrace xmlns="http://namespace.amberpoint.com/amf" xmlns:ap="http://name space.amberpoint.com/amf" >org.exolab.castor.jdo.LockNotGrantedException: persis t.deadlock at org.exolab.castor.persist.ObjectLock.detectDeadlock(Unknown Source) at org.exolab.castor.persist.ObjectLock.upgrade(Unknown Source) at org.exolab.castor.persist.LockEngine$TypeInfo.upgrade(Unknown Source) at org.exolab.castor.persist.LockEngine$TypeInfo.access$600(Unknown Sour ce) at org.exolab.castor.persist.LockEngine.writeLock(Unknown Source) at org.exolab.castor.persist.TransactionContext.writeLock(Unknown Source ) at org.exolab.castor.persist.ClassMolder.preStore(Unknown Source) at org.exolab.castor.persist.LockEngine.preStore(Unknown Source) at org.exolab.castor.persist.TransactionContext.prepare(Unknown Source) at org.exolab.castor.jdo.engine.DatabaseImpl.commit(Unknown Source) at com.amberpoint.domain.DomainManager$Configuror.doGetAll(DomainManager .java:483) at com.amberpoint.domain.DomainManager$Configuror.access$700(DomainManag er.java:207) at com.amberpoint.domain.DomainManager$DomainAction.notify(DomainManager .java:1326) at com.amberpoint.agent.Action.dispatch(Action.java:153) at com.amberpoint.agent.backplane.StandardMessagingSystem.processInputAc tions(StandardMessagingSystem.java:710) at com.amberpoint.agent.backplane.StandardMessagingSystem.processPhaseAc tions(StandardMessagingSystem.java:649) at com.amberpoint.agent.backplane.StandardMessagingSystem.processSOAPMes sage(StandardMessagingSystem.java:555) at com.amberpoint.agent.backplane.servlet.ServletDriver.doRequest(Servle tDriver.java:861) at com.amberpoint.agent.backplane.servlet.AmberPointFilter.doFilter(Ambe rPointFilter.java:136) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unkn own Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Sour ce) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown So urce) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.valves.CertificatesValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source ) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.authenticator.SingleSignOn.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.connector.http.HttpProcessor.process(Unknown Sour ce) at org.apache.catalina.connector.http.HttpProcessor.run(Unknown Source) at java.lang.Thread.run(Thread.java:536) -- __o _-\<,_ Brian (_)/ (_) [EMAIL PROTECTED] x503 ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
