jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Harris" <michael.e.har...@gmail.com>
Subject versioning a file
Date Thu, 24 Jul 2008 15:10:02 GMT
hey all,

so i can create file

        Node fileNode = parentFolder.addNode(file.getName(), "nt:file");

        // make the file versionable and lockable

        // create the mandatory child node - jcr:content
        Node resNode = fileNode.addNode("jcr:content", "nt:resource");

I added the middle line to make the file versionable.  but when I try to
getVersionHistory on the file I get an exception

javax.jcr.UnsupportedRepositoryOperationException: Unable to perform
versioning operation on non versionable node: /files/testVersionFile

any ideas?  Can I add the mix:versionable type to nt:file?  If not, how does
one version a file?

Michael Harris

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message