jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alex soto <lexs...@gmail.com>
Subject Re: Unable to set mixin-defined property on nt:folder node
Date Tue, 20 Dec 2011 14:19:02 GMT
In case anybody encounters this problem.  I found the cause and solution.
The problem is that the property is multi-value:

                propertyDef.setName("my:IsFriendOf"); 
                propertyDef.setMultiple(true); 

The error message is kind of misleading; what is actually happening is that
the property exists, but with a different data type.  The problem goes away
by setting the property this way:

		Value val[] = new Value[]{session.getValueFactory().createValue(jane)};
                joe.setProperty("my:IsFriendOf", val);

I wish this error message was more informative. It should say something
about incompatible data types, rather than the "not found" misleading
message. 

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Unable-to-set-mixin-defined-property-on-nt-folder-node-tp4215632p4217947.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message