You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by wildes miranda oliveira <wi...@gmail.com> on 2010/05/03 15:30:10 UTC

Constraint violation on new nt:folder childNodes

hi guys, is correct to constrain childNode types on a nt:folder node ? Im
using 2.0 version and getting following exception on create a childNode with
custom type on nt:folder node.

Caused by: javax.jcr.nodetype.ConstraintViolationException: No child node
definition for custom_type found in node /nt_folder
    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1491)
    at
org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:2087)
    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1992)
    at
gov.goias.ged.control.FileManagerControl.create(FileManagerControl.java:56)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
    at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
    at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
    at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
    at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
    at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
    at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at
org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
    at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
    at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
    at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
    at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
    at
gov.goias.ged.control.FileManagerControl_$$_javassist_seam_4.create(FileManagerControl_$$_javassist_seam_4.java)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
    at
org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348)
    at
org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
    at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
    at
org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
    at
org.jboss.seam.el.OptionalParameterMethodExpression.invoke(OptionalParameterMethodExpression.java:45)
    at
com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
    at
javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:99)
    ... 45 more
Caused by: javax.jcr.nodetype.ConstraintViolationException: no matching
child node definition found for {}custom_type
    at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicableChildNodeDef(EffectiveNodeType.java:744)
    at
org.apache.jackrabbit.core.NodeImpl.getApplicableChildNodeDefinition(NodeImpl.java:733)
    at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1489)
    ... 79 more

Re: Constraint violation on new nt:folder childNodes

Posted by wildes miranda oliveira <wi...@gmail.com>.
thanks!

2010/5/3 Stefan Guggisberg <st...@gmail.com>

> On Mon, May 3, 2010 at 3:46 PM, ChadDavis <ch...@gmail.com>
> wrote:
> > On Mon, May 3, 2010 at 7:30 AM, wildes miranda oliveira
> > <wi...@gmail.com> wrote:
> >> hi guys, is correct to constrain childNode types on a nt:folder node ?
> Im
> >> using 2.0 version and getting following exception on create a childNode
> with
> >> custom type on nt:folder node.
> >
> > Absolutely.  See the node type definition for nt:folder in the
> > specification.  I believe it's restricted to nt:folder and nt:file.
>
> nt:hierarchyNode, to be precise [0]
>
> cheers
> stefan
>
> [0] http://wiki.apache.org/jackrabbit/nt:folder
>
> >
>

Re: Constraint violation on new nt:folder childNodes

Posted by Stefan Guggisberg <st...@gmail.com>.
On Mon, May 3, 2010 at 3:46 PM, ChadDavis <ch...@gmail.com> wrote:
> On Mon, May 3, 2010 at 7:30 AM, wildes miranda oliveira
> <wi...@gmail.com> wrote:
>> hi guys, is correct to constrain childNode types on a nt:folder node ? Im
>> using 2.0 version and getting following exception on create a childNode with
>> custom type on nt:folder node.
>
> Absolutely.  See the node type definition for nt:folder in the
> specification.  I believe it's restricted to nt:folder and nt:file.

nt:hierarchyNode, to be precise [0]

cheers
stefan

[0] http://wiki.apache.org/jackrabbit/nt:folder

>

Re: Constraint violation on new nt:folder childNodes

Posted by ChadDavis <ch...@gmail.com>.
On Mon, May 3, 2010 at 7:30 AM, wildes miranda oliveira
<wi...@gmail.com> wrote:
> hi guys, is correct to constrain childNode types on a nt:folder node ? Im
> using 2.0 version and getting following exception on create a childNode with
> custom type on nt:folder node.

Absolutely.  See the node type definition for nt:folder in the
specification.  I believe it's restricted to nt:folder and nt:file.