jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject Re: checkin problem
Date Wed, 02 Apr 2008 12:30:40 GMT
When you first create a versionable node, and set properties on it you don't 
have to check it in, session.save is all you need.

>From then on, if you want to make changes follow this pattern

node.checkout();
node.setProperty(......);
.....
....
node.save();
node.checkin();
session.save();

//create versionable node
          Node n = parentNode.addNode("childNode", "nt:unstructured");
          n.addMixin("mix:versionable");
          n.setProperty("anyProperty", "Blah");
          session.save();
          Version firstVersion = n.checkin();



----- Original Message ----- 
From: "Katia Santos" <katiasantos@gmail.com>
To: <users@jackrabbit.apache.org>
Sent: Wednesday, April 02, 2008 4:52 AM
Subject: Re: checkin problem


Hello,

I still have checkin problems, even with jackrabbit 1.4.2.

I´m doing the example in the wiki page:

//create versionable node
          Node n = parentNode.addNode("childNode", "nt:unstructured");
          n.addMixin("mix:versionable");
          n.setProperty("anyProperty", "Blah");
          session.save();
          Version firstVersion = n.checkin();

In the last line, when it does the checkin it sends an exception:
 javax.jcr.RepositoryException: /Outros/Documento[13]: unable to
update item.: 068f02ca-c562-4c31-b8ff-2e091a985932:
068f02ca-c562-4c31-b8ff-2e091a985932

This is the example on the jackrabbit wiki. Is it wrong?? Can someone
explain to me why it doesnt work? I really tried everything...always sends
an exception. Helppp pleeesee :)


Katia


Mime
View raw message