You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Brian Moseley <bc...@osafoundation.org> on 2005/07/23 01:33:51 UTC
node type registration: ambiguous residual child node definition
error
i have defined two node types:
icalendar:component
|
|--icalendar:calendar
(see below for spec notation and NodeTypeReader xml)
each node type includes a residual child node definition distinguished
by default primary type and required primary type.
when i try to register these node types, i get the following exception:
=======
org.apache.jackrabbit.core.nodetype.NodeTypeConflictException: A child
node definition in node type
'{http://osafoundation.org/jcr/icalendar/1.0}component' conflicts with
node type '{http://osafoundation.org/jcr/icalendar/1.0}calendar':
ambiguous residual child node definition
at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.internalMerge(EffectiveNodeType.java:1041)
at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.create(EffectiveNodeType.java:175)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.validateNodeTypeDef(NodeTypeRegistry.java:788)
... 30 more
========
when i change the definitions so that icalendar:calendar does not extend
icalendar:component but rather includes both residual child node
definitions, the node types both register successfully.
i don't see anything in section 6.7.15 of the spec that describes this
situation. am i missing something that would make me understand why i'm
getting this error, or is it perhaps a bug?
=========
NodeTypeName
icalendar:component
SuperTypes
nt:base
IsMixin
false
HasOrderableChildNodes
false
PrimaryItemName
null
ChildNodeDef
Name *
RequiredPrimaryTypes [icalendar:xproperty]
DefaultPrimaryType icalendar:xproperty
AutoCreate false
Mandatory false
OnParentVersion VERSION
Protected false
SameNamedSibs true
NodeTypeName
icalendar:calendar
SuperTypes
icalendar:component
IsMixin
false
HasOrderableChildNodes
false
PrimaryItemName
null
ChildNodeDef
Name *
RequiredPrimaryTypes [icalendar:component]
DefaultPrimaryType null
AutoCreate false
Mandatory false
OnParentVersion VERSION
Protected false
SameNamedSibs true
=========
<nodeType hasOrderableChildNodes="false" isMixin="false"
name="icalendar:component" primaryItemName="">
<supertypes>
<supertype>nt:base</supertype>
</supertypes>
<childNodeDefinition autoCreated="false"
defaultPrimaryType="icalendar:xproperty"
mandatory="false" name="*"
onParentVersion="VERSION" protected="false"
sameNameSiblings="true">
<requiredPrimaryTypes>
<requiredPrimaryType>icalendar:xproperty</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
</nodeType>
<nodeType hasOrderableChildNodes="false" isMixin="false"
name="icalendar:calendar" primaryItemName="">
<supertypes>
<supertype>icalendar:component</supertype>
</supertypes>
<childNodeDefinition autoCreated="false" defaultPrimaryType=""
mandatory="false" name="*"
onParentVersion="VERSION" protected="false"
sameNameSiblings="true">
<requiredPrimaryTypes>
<requiredPrimaryType>icalendar:component</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
</nodeType>
Re: node type registration: ambiguous residual child node definition
error
Posted by Brian Moseley <bc...@osafoundation.org>.
Stefan Guggisberg wrote:
> yep, it's a bug. i fixed it (rev 225151).
> thanks for reporting the problem.
excellent, thanks!
Re: node type registration: ambiguous residual child node definition error
Posted by Stefan Guggisberg <st...@gmail.com>.
hi brian,
On 7/23/05, Brian Moseley <bc...@osafoundation.org> wrote:
>
> i have defined two node types:
>
> icalendar:component
> |
> |--icalendar:calendar
>
> (see below for spec notation and NodeTypeReader xml)
>
> each node type includes a residual child node definition distinguished
> by default primary type and required primary type.
>
> when i try to register these node types, i get the following exception:
>
> =======
>
> org.apache.jackrabbit.core.nodetype.NodeTypeConflictException: A child
> node definition in node type
> '{http://osafoundation.org/jcr/icalendar/1.0}component' conflicts with
> node type '{http://osafoundation.org/jcr/icalendar/1.0}calendar':
> ambiguous residual child node definition
> at
> org.apache.jackrabbit.core.nodetype.EffectiveNodeType.internalMerge(EffectiveNodeType.java:1041)
>
> at
> org.apache.jackrabbit.core.nodetype.EffectiveNodeType.create(EffectiveNodeType.java:175)
> at
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.validateNodeTypeDef(NodeTypeRegistry.java:788)
> ... 30 more
>
> ========
>
> when i change the definitions so that icalendar:calendar does not extend
> icalendar:component but rather includes both residual child node
> definitions, the node types both register successfully.
>
> i don't see anything in section 6.7.15 of the spec that describes this
> situation. am i missing something that would make me understand why i'm
> getting this error, or is it perhaps a bug?
yep, it's a bug. i fixed it (rev 225151).
thanks for reporting the problem.
cheers
stefan
>
> =========
>
> NodeTypeName
> icalendar:component
> SuperTypes
> nt:base
> IsMixin
> false
> HasOrderableChildNodes
> false
> PrimaryItemName
> null
> ChildNodeDef
> Name *
> RequiredPrimaryTypes [icalendar:xproperty]
> DefaultPrimaryType icalendar:xproperty
> AutoCreate false
> Mandatory false
> OnParentVersion VERSION
> Protected false
> SameNamedSibs true
>
> NodeTypeName
> icalendar:calendar
> SuperTypes
> icalendar:component
> IsMixin
> false
> HasOrderableChildNodes
> false
> PrimaryItemName
> null
> ChildNodeDef
> Name *
> RequiredPrimaryTypes [icalendar:component]
> DefaultPrimaryType null
> AutoCreate false
> Mandatory false
> OnParentVersion VERSION
> Protected false
> SameNamedSibs true
>
> =========
>
> <nodeType hasOrderableChildNodes="false" isMixin="false"
> name="icalendar:component" primaryItemName="">
> <supertypes>
> <supertype>nt:base</supertype>
> </supertypes>
> <childNodeDefinition autoCreated="false"
> defaultPrimaryType="icalendar:xproperty"
> mandatory="false" name="*"
> onParentVersion="VERSION" protected="false"
> sameNameSiblings="true">
> <requiredPrimaryTypes>
> <requiredPrimaryType>icalendar:xproperty</requiredPrimaryType>
> </requiredPrimaryTypes>
> </childNodeDefinition>
> </nodeType>
>
> <nodeType hasOrderableChildNodes="false" isMixin="false"
> name="icalendar:calendar" primaryItemName="">
> <supertypes>
> <supertype>icalendar:component</supertype>
> </supertypes>
> <childNodeDefinition autoCreated="false" defaultPrimaryType=""
> mandatory="false" name="*"
> onParentVersion="VERSION" protected="false"
> sameNameSiblings="true">
> <requiredPrimaryTypes>
> <requiredPrimaryType>icalendar:component</requiredPrimaryType>
> </requiredPrimaryTypes>
> </childNodeDefinition>
> </nodeType>
>