You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by summon <dd...@hotmail.com> on 2009/12/10 10:58:07 UTC

Question on CND syntax regarding Collections

Hi there,

I've run into a problem with Jackrabbit's CND syntax I can't seem to figure
out. 

I'm trying to insert a JavaBean into the Jackrabbit repository using an
ObjectContentManager. As one attribute I have a property List<String>
attribute which I annotated as @Collection.

The corresponding node type that I have defined in a CND and successfully
registered in the repository, contains an attribute with the same name as
follows:

- attribute (string) multiple

The error I'm getting is the following:

org.apache.jackrabbit.ocm.exception.ObjectContentManagerException: Cannot
insert collection field : attribute of class
de.fraunhofer.igd.knowledgegrid.vo.grid.KomponenteBeschreibung. Constraint
violation.; nested exception is
javax.jcr.nodetype.ConstraintViolationException: no definition found in
parent node's node type for new node: no matching child node definition
found for {}attribute


Does that mean Collections must be matched with a new child node? And if so,
how does that child node have to look like (in terms of CND syntax) if it
represents a List<String>?
-- 
View this message in context: http://n4.nabble.com/Question-on-CND-syntax-regarding-Collections-tp956826p956826.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.