Hi everyone.
I'm trying to access properties from frozen nodes (versioned nodes). I used the "Versioning Basics" example from the JackrabbitWiki, works well when unchanged. (see http://wiki.apache.org/jackrabbit/ExamplesPage) The versions are available, but the problem is: I always get a PathNotFoundException when reading a property (sample code and stack trace below) from a versioned node. Same result with the unchanged example code from the article by Frank Sommers (http://www.artima.com/lejava/articles/contentrepository3.html). He retrieves the frozen nodes with NodeIterator it = v.getNodes("jcr:frozenNode"); but the 'getProperty()' in the example code doesn't work either. What am I doing wrong? Any help would be great. My jackrabbit version is 1.3, the repository configuration file is from jackrabbit-1.3-src/jackrabbit-core/applications/test/repository.xml (unchanged) with org.apache.jackrabbit.core.fs.local.LocalFileSystem. Code: (see also: http://wiki.apache.org/jackrabbit/ExamplesPage) //print version history VersionHistory history = child.getVersionHistory(); for (VersionIterator it = history.getAllVersions(); it.hasNext();) { Version version = (Version) it.next(); System.out.println(version.getCreated().getTime()); // PROBLEM: System.out.println(version.getProperty("anyProperty").getString(); } javax.jcr.PathNotFoundException: anyProperty at org.apache.jackrabbit.core.NodeImpl.getProperty(NodeImpl.java:2503) at test.jcr.VersioningTest.testVersioning(VersioningTest.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunne r.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.j ava:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRu nner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:7 5) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassM ethodsRunner.java:66) at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner. java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.j ava:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRu nner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
