You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Ryan Dewell <ry...@dewell.org> on 2005/04/26 21:41:48 UTC
Circular node type dependencies
Hi,
Is it expected to be possible to create circular node type dependencies?
Example:
Node type A has B nodes as its only child type, and node type B has A nodes
as its only child type.
It works just fine when I initially construct + register the NodeTypeDef's,
ChildNodeTypeDef's etc, and use them in the same session I registered them
in.
However, when I then restart and jackrabbit reads those new definitions from
custom_nodetypes.xml, it no longer works. The error is:
-------------
Caused by: org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException:
the following node types could not be registered because of unresolvable
dependencies: <LIST OF NODE TYPES>
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.internalRegister(NodeTypeRegistry.java:287)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegistry.java:207)
-------------
In summary, the dependencies work when used in the same session where they
where added to NodeTypeRegistry, but the dependencies do not work on the
next go around when read from custom_nodetypes.xml.
Note: I'm using a jackrabbit build from April 8th.
Ryan
Re: Circular node type dependencies
Posted by Stefan Guggisberg <st...@gmail.com>.
hi ryan,
can you please send me your custom_nodetypes.xml?
in general it should be possible to register nodetypes
that have circular dependencies as long as their autoCreated
child nodes would not lead to an infinite recursion when you
'instantiate' such a type.
cheers
stefan
On 4/26/05, Ryan Dewell <ry...@dewell.org> wrote:
> Hi,
>
> Is it expected to be possible to create circular node type dependencies?
>
> Example:
> Node type A has B nodes as its only child type, and node type B has A nodes
> as its only child type.
>
> It works just fine when I initially construct + register the NodeTypeDef's,
> ChildNodeTypeDef's etc, and use them in the same session I registered them
> in.
>
> However, when I then restart and jackrabbit reads those new definitions from
> custom_nodetypes.xml, it no longer works. The error is:
>
> -------------
> Caused by: org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException:
> the following node types could not be registered because of unresolvable
> dependencies: <LIST OF NODE TYPES>
>
> at
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.internalRegister(NodeTypeRegistry.java:287)
> at
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegistry.java:207)
> -------------
>
> In summary, the dependencies work when used in the same session where they
> where added to NodeTypeRegistry, but the dependencies do not work on the
> next go around when read from custom_nodetypes.xml.
>
> Note: I'm using a jackrabbit build from April 8th.
>
> Ryan
>
>