jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: Adding jcr:title and jcr:description properties
Date Wed, 03 Mar 2010 10:40:34 GMT
hi nils,

On Wed, Mar 3, 2010 at 11:24 AM, Nils Weinander
<nils.weinander@mogul.com> wrote:
>
> Probably a stupid newbie question, but here it goes. I use Jackrabbit 2.0.0
> through Spring-JCR. I want to use the jcr:title and jcr:description
> properties from the mix:title mixin. The significant portion of the code
> looks like this:
>
>   Node containerNode = rootNode.addNode(id, jcrConstants.getNT_FOLDER());
>   containerNode.addMixin("mix:title");
>   containerNode.setProperty("jcr:title", title);
>   containerNode.setProperty("jcr:description", description);
>   session.save();

you're sure that 'session' is the one where you got 'rootNode' from?

did you try to run a simple test case which just uses the jcr api
(without any blackbox magic on top of if ;)? see jackrabbit-jcr-tests
for examples.

cheers
stefan

>
> but containerNode doesn't get the properties. I have tried assigning a
> Property variable
>
>   Property prop = containerNode.setProperty("jcr:title", title);
>
> and debug it. When I do I get a log message
>
> ERROR - ItemManager                -
> 839e3f38-ca8b-4d65-b1e7-abc1a75ff3e1/{http://www.jcp.org/jcr/1.0}title:
> failed to determine path to
>
> which doesn't tell me very much as it is cut off after "path to". I don't
> get any exceptions.
>
> What am I doing wrong here?
>
>
> -----
> ____________________________________________________________
> Nils Weinander
> --
> View this message in context: http://n4.nabble.com/Adding-jcr-title-and-jcr-description-properties-tp1576347p1576347.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>

Mime
View raw message