jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gems450 <s.sm...@yelladworks.com>
Subject nt:file versioning exception
Date Tue, 24 Nov 2009 16:59:13 GMT


Hi 
Im having some probs when trying to versioning a nt:file node  the code 
below is standard I believe.

  Node fileNode = bundleNode.addNode (fileName, "nt:file");
       fileNode.addMixin("mix:versionable");
       //create the mandatory child node - jcr:content
       Node resNode = fileNode.addNode ("jcr:content", "nt:resource");
       resNode.setProperty ("jcr:mimeType", mimetype);
       resNode.setProperty ("jcr:data", new FileInputStream(file));   
       Calendar lastModified = Calendar.getInstance ();
       lastModified.setTimeInMillis(file.lastModified ());
       resNode.setProperty ("jcr:lastModified", lastModified);
       session.save();
       fileNode.checkin();


         //then get it back out so  as to create another version.
    fileNode.checkout();
   fileNode.checkin();



I get a repository exception with this message.     Missing child node 
entry for node with id: 

this is thrown evertime checkin is called. I do not understand why this 
happens. any help greatly appreciated.

Si Smith


-- 
View this message in context: http://n4.nabble.com/nt-file-versioning-exception-tp786973p786973.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message