Hi. Thanks for reply.
We're using Jackrabbit 1.4.2. Indeed, it seems that JCR-1476 is the problem
which caused our NPE.
But please note, that there's another failing test
(testRemoveVersionInTxThreeTransactions()) which does not throw NPE (and
restores node successfully) but fails to remove version which was
base-version before restore. Do you think that JCR-1476 causes this problem
too, or is this another problem?


Marcel Reutegger wrote:
> 
> Hi,
> 
> what version of jackrabbit are you using?
> 
> this might be related to https://issues.apache.org/jira/browse/JCR-1476
> which is fixed in 1.4.3.
> 
> regards
>   marcel
> 
> Roman Puchkovskiy wrote:
>> Here's exception which is thrown by failing test:
>> 
>> java.lang.NullPointerException
>>      at
>> org.apache.jackrabbit.core.NodeImpl.restoreFrozenState(NodeImpl.java:3872)
>>      at
>> org.apache.jackrabbit.core.NodeImpl.internalRestore(NodeImpl.java:3840)
>>      at
>> org.apache.jackrabbit.core.NodeImpl.internalRestore(NodeImpl.java:3801)
>>      at org.apache.jackrabbit.core.NodeImpl.restore(NodeImpl.java:3072)
>>      at
>> RemoveVersionInTxTest.doTestRemoveVersion(RemoveVersionInTxTest.java:62)
>>      at RemoveVersionInTxTest.access$100(RemoveVersionInTxTest.java:22)
>>      at RemoveVersionInTxTest$1$1.doInJcr(RemoveVersionInTxTest.java:33)
>>      at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:76)
>>      at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:108)
>>      at
>> RemoveVersionInTxTest$1.doInTransaction(RemoveVersionInTxTest.java:30)
>>      at
>> org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
>>      at
>> RemoveVersionInTxTest.testRemoveVersionInTx(RemoveVersionInTxTest.java:28)
>>      at
>> RemoveVersionInTxTest.testRemoveVersionInTx(RemoveVersionInTxTest.java:28)
>>      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:597)
>>      at junit.framework.TestCase.runTest(TestCase.java:154)
>>      at junit.framework.TestCase.runBare(TestCase.java:127)
>>      at junit.framework.TestResult$1.protect(TestResult.java:106)
>>      at junit.framework.TestResult.runProtected(TestResult.java:124)
>>      at junit.framework.TestResult.run(TestResult.java:109)
>>      at junit.framework.TestCase.run(TestCase.java:118)
>>      at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>      at junit.framework.TestSuite.run(TestSuite.java:203)
>>      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:597)
>>      at
>> org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
>>      at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
>>      at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
>>      at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>>      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:597)
>>      at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>>      at
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Node.restore-in-transaction-tp17089810p17120165.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Reply via email to