The reason jcr:data is not found is becuase the root version does not have
it. So while going through the loop of all versions, skip the first node.
VersionManager versionMgr =
session.getWorkspace().getVersionManager();
VersionHistory history = versionMgr.getVersionHistory(path to
jcr:content);
VersionIterator ito = history.getAllVersions();
while (ito.hasNext()) {
Version v = ito.nextVersion();
String version = v.getName();
if (version.startsWith("jcr:"))
{
continue; // skip root version
}
Node frozenNode = v.getFrozenNode();
// now you can see jcr:data property
}
--
View this message in context:
http://jackrabbit.510166.n4.nabble.com/Jackrabbit-2-2-8-Retrieval-of-JCR-data-node-from-VersionHistory-not-available-tp3860061p4660024.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.