Hi Dominique,

Thanks for answering so quickly.


Well, it is ItemImpl.save() that checks for dirty references and that invokes LocalItemStateManager.store() for every one of them. The LocalItemStateManager itself stores them inside the ChangeLog after checking the validity. The local ChangeLog will later feed the shared ChangeLog inside SharedItemStateManager which ultimately hands them over to the PersistenceManager. Note, that you if make references to the version store you won't see NodeReferences inside the ChangeLog.


What did you try when you observed that new references are not stored in the ChangeLog?


I'm implementing both the HibernatePersistenceManager and OJBPersistenceManager, and I'm getting the following failures when running the XATest :

[junit] Caused by: org.apache.jackrabbit.core.state.ItemStateException: Target node 7c8c3924-ecf0-4597-9565-08bba4975340 of REFERENCE property does not exis
t
[junit] at org.apache.jackrabbit.core.state.SharedItemStateManager.store(SharedItemStateManager.java:422)
[junit] at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:325)
[junit] at org.apache.jackrabbit.core.state.TransactionalItemStateManager.commit(TransactionalItemStateManager.java:93)
[junit] ... 20 more
[junit] org.apache.jackrabbit.core.state.ItemStateException: Target node 7c8c3924-ecf0-4597-9565-08bba4975340 of REFERENCE property does not exist
[junit] at org.apache.jackrabbit.core.state.SharedItemStateManager.store(SharedItemStateManager.java:422)
[junit] at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:325)
[junit] at org.apache.jackrabbit.core.state.TransactionalItemStateManager.commit(TransactionalItemStateManager.java:93)
[junit] at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:254)
[junit] at org.apache.jackrabbit.core.UserTransactionImpl.commit(UserTransactionImpl.java:109)
[junit] at org.apache.jackrabbit.core.XATest.testAddReference(XATest.java:319)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:324)
[junit] at junit.framework.TestCase.runTest(TestCase.java:154)
[junit] at org.apache.jackrabbit.core.XATest.runTest(XATest.java:42)
[junit] at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536)


From debugging, it seems that the PersistenceManager is never called to store the reference added in the addReferences() test. I'm trying to figure out why but I'm a little lost...

Regards,
 Serge Huber.

Reply via email to