jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From proloyganguly <proloy.gang...@wipro.com>
Subject Problem with Document movement within folders
Date Thu, 18 Aug 2011 06:25:50 GMT
javax.jcr.version.VersionException: /Documents/F2/BC: cannot move a target to
a checked-in node 

This exception is coming after checkout the target folder. Please see the
code below. 
Code: 
Session session = CustomSession.getSession(); 
        Node node2 = session.getRootNode().getNode(path); 

        node2.checkout(); // Destination folder             
        Node node1 = session.getRootNode().getNode(docPath+"/"+ docName);         
        node1.getParent().checkout();//Parent of source 
        node2.checkout(); 
        node1.getSession().move(node1.getPath() ,node2.getPath()); 
        node2.getSession().save(); 
        node1.getParent().checkin();         
        node2.checkin(); 
         

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Problem-with-Document-movement-within-folders-tp3751877p3751877.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message