jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu" <the.mindstorm.mailingl...@gmail.com>
Subject Re: javax.jcr.nodetype.ConstraintViolationException
Date Fri, 21 Apr 2006 17:37:16 GMT
More details:

The method is called with QName[] containing:
[{http://www.c4media.com/jcr/cmed}forumaware,
{http://www.jcp.org/jcr/mix/1.0}versionable,
{http://www.magnolia.info/jcr/mgnl}contentNode]

which is good.

The problem comes from the EffectiveNodeTypeCache used in the
specified method that contains that EffectiveNodeType with the b)
description. It really beats me from where that EffectiveNodeType is
created.

Is this info helping you to help me?

./alex
--
.w( the_mindstorm )p.


On 4/21/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> The problem seems to come from:
>
> NodeTypeRegistry.getEffectiveNodeType(QName[] ntNames,
>
> EffectiveNodeTypeCache anEntCache,
>                                                                Map
> aRegisteredNTDefCache)
>
> where the final tmpResults contains: 2 EffectiveNodeType with the following
> allNodeTypes:
> a) [{http://www.jcp.org/jcr/mix/1.0}referenceable,
> {http://www.jcp.org/jcr/mix/1.0}versionable,
> {http://www.jcp.org/jcr/nt/1.0}base,
> {http://www.jcp.org/jcr/nt/1.0}hierarchyNode,
> {http://www.magnolia.info/jcr/mgnl}contentNode]
> b) [{http://www.c4media.com/jcr/cmed}forumaware,
> {http://www.jcp.org/jcr/nt/1.0}base,
> {http://www.jcp.org/jcr/nt/1.0}unstructured]
>
> and from the merge part the exception is thrown. Unfortunately, this
> piece of code is quite complex to be understand without knowing the
> internals. I would appreciate any help understanding what's going on.
>
> ./alex
> --
> .w( the_mindstorm )p.
>
>
> On 4/21/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> > Hi!
> >
> > I have the following node type definitions:
> >
> > [code]
> >     <nodeType name="mgnl:contentNode" isMixin="false"
> > hasOrderableChildNodes="true" primaryItemName="">
> >         <supertypes>
> >             <supertype>nt:hierarchyNode</supertype>
> >         </supertypes>
> >         <childNodeDefinition name="MetaData"
> > defaultPrimaryType="mgnl:metaData" autoCreated="true" mandatory="true"
> > onParentVersion="COPY" protected="false" sameNameSiblings="false">
> >             <requiredPrimaryTypes>
> >                 <requiredPrimaryType>mgnl:metaData</requiredPrimaryType>
> >             </requiredPrimaryTypes>
> >         </childNodeDefinition>
> >         <childNodeDefinition name="*" defaultPrimaryType=""
> > autoCreated="false" mandatory="false" onParentVersion="COPY"
> > protected="false" sameNameSiblings="true">
> >             <requiredPrimaryTypes>
> >                 <requiredPrimaryType>nt:base</requiredPrimaryType>
> >             </requiredPrimaryTypes>
> >         </childNodeDefinition>
> >         <propertyDefinition name="*" requiredType="undefined"
> > autoCreated="false" mandatory="false" onParentVersion="COPY"
> > protected="false" multiple="false"/>
> >     </nodeType>
> > [/code]
> >
> > and the mixin
> >
> > [code]
> >     <nodeType name="cmed:forumaware" isMixin="true"
> > hasOrderableChildNodes="false" primaryItemName="">
> >         <supertypes>
> >             <supertype>nt:base</supertype>
> >         </supertypes>
> >         <propertyDefinition name="cmed:forumId" requiredType="String"
> > autoCreated="false" mandatory="false" onParentVersion="COPY"
> > protected="false" multiple="false" />
> >     </nodeType>
> > [/code]
> >
> > If I try to create a node of type mgnl:contentNode that is also
> > mix:versionable and also cmed:forumaware than I am getting this
> > exception:
> >
> > [stack]
> > javax.jcr.nodetype.ConstraintViolationException: A property definition
> > in node type '{http://www.jcp.org/jcr/nt/1.0}unstructured' conflicts
> > with node type '{http://www.magnolia.info/jcr/mgnl}contentNode':
> > ambiguous residual property definition
> >         at org.apache.jackrabbit.core.NodeImpl.addMixin(NodeImpl.java:1033)
> >         at org.apache.jackrabbit.core.NodeImpl.addMixin(NodeImpl.java:2539)
> > [/stack]
> >
> > Unfortunately, I am completely unable to understand what is wrong. Can
> > you please shed some light on it?
> >
> > many, many thanks in advance,
> >
> > ./alex
> > --
> > .w( the_mindstorm )p.
> >
>

Mime
View raw message