hey all,

so i can create file

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

        // make the file versionable and lockable
        fileNode.addMixin("mix:versionable");

        // 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
    at
org.apache.jackrabbit.core.NodeImpl.checkVersionable(NodeImpl.java:3215)


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

-- 
---------------------
Michael Harris

Reply via email to