You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Emmanuel Hugonnet <eh...@gmail.com> on 2008/05/29 15:58:36 UTC
CND definition
Hi,
I would like to define my own nodes.
My node is a multilingual 'folder' with its own name and own descripion.
I want some sort of virtual folder to aggregate these translations.
Of course I want my virtual folder to have virtual folder as child and
files.
Here is my cnd:
<mix='http://www.jcp.org/jcr/mix/1.0'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
<slv='http://www.silverpeas.com/jcr/1.0'>
[slv:i18nNode] > nt:folder
- slv:name (STRING) mandatory
- slv:description (STRING)
- slv:lang (STRING) = 'fr' mandatory
/* Nodes are the themes used in kmelia */
[slv:node] > nt:folder
+ slv:translations (slv:i18nNode) multiple
+ * (slv:node)
/* Kmelia instance node */
[slv:kmelia] > nt:folder
+ * (slv:node)
but I have this exception :
javax.jcr.nodetype.ConstraintViolationException: no matching property
definition found for {http://www.silverpeas.com/jcr/1.0}translations
at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:773)
at
org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:903)
at
org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:409)
at
org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:380)
at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2446)
What am I missing ?
Thanks,
Emmanuel
Re: CND definition
Posted by Emmanuel Hugonnet <eh...@gmail.com>.
Hi,
Yes, that is it.
The good configuration is :
/* Nodes are the themes used in kmelia */
[slv:node] > nt:folder
- slv:translations (reference) multiple < slv:i18nNode
+ * (slv:node)
Emmanuel
On Thu, May 29, 2008 at 6:01 PM, Alexander Klimetschek <ak...@day.com>
wrote:
> On Thu, May 29, 2008 at 3:58 PM, Emmanuel Hugonnet <eh...@gmail.com>
> wrote:
> > [slv:node] > nt:folder
> > + slv:translations (slv:i18nNode) multiple
> > ...
> > javax.jcr.nodetype.ConstraintViolationException: no matching property
> > definition found for {http://www.silverpeas.com/jcr/1.0}translations<http://www.silverpeas.com/jcr/1.0%7Dtranslations>
> > ...
> > at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2446)
>
> It seems that you set the property slv:translations in your code, but
> it is defined as a child node in the slv:node definition. If not, what
> is the code the triggers this exception?
>
> Regards
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>
Re: CND definition
Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, May 29, 2008 at 3:58 PM, Emmanuel Hugonnet <eh...@gmail.com> wrote:
> [slv:node] > nt:folder
> + slv:translations (slv:i18nNode) multiple
> ...
> javax.jcr.nodetype.ConstraintViolationException: no matching property
> definition found for {http://www.silverpeas.com/jcr/1.0}translations
> ...
> at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2446)
It seems that you set the property slv:translations in your code, but
it is defined as a child node in the slv:node definition. If not, what
is the code the triggers this exception?
Regards
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com