You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Juan Diego Botiva Leon <ju...@hotmail.com> on 2010/10/11 18:07:07 UTC

Node Types Registration Fails Migrating to Jackrabbit 2.1.1

Hi!

I'm migrating our Jackrabbit 1.6.1 repository to Jackrabbit 2.1.1, but when the repository is started, my custom node types registration fails with the following exception:

javax.jcr.nodetype.InvalidNodeTypeDefinitionException: [{http://www.mynt.org/jcr/mynt/1.0}attachment] primaryItemName is already specified by a supertype and must therefore not be overridden.
   at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:597)
   at org.apache.jackrabbit.commons.cnd.CndImporter.registerNodeTypes(CndImporter.java:127)
   at org.apache.jackrabbit.commons.cnd.CndImporter.registerNodeTypes(CndImporter.java:74)

My CND file is as follows:

<mynt = 'http://www.mynt.org/jcr/mynt/1.0'>
<mix = 'http://www.jcp.org/jcr/mix/1.0' >
<nt = 'http://www.jcp.org/jcr/nt/1.0'>

[mynt:attachment] > nt:file, mix:referenceable
- mynt:id (Long) mandatory primary
- mynt:name (String) mandatory

[mynt:systemObject] > nt:hierarchyNode, mix:referenceable
- mynt:id (Long) mandatory primary
- mynt:name (String) mandatory
- mynt:class (String) mandatory
+ * (mynt:attachment) = mynt:attachment

[mynt:attachments] > nt:hierarchyNode
+ * (mynt:systemObject) = mynt:systemObject

[mynt:document] > nt:file, mix:referenceable, mix:versionable
- mynt:id (Long) mandatory primary
- mynt:name (String) mandatory

[mynt:folder] > nt:folder, mix:referenceable
- mynt:id (Long) mandatory primary
- mynt:name (String) mandatory
+ * (mynt:folder) = mynt:folder
+ * (mynt:document) = mynt:document

[mynt:documents] > nt:hierarchyNode
+ * (mynt:folder) = mynt:folder
+ * (mynt:document) = mynt:document

[mynt:workspace] > nt:hierarchyNode, mix:referenceable
- mynt:id (Long) mandatory primary
- mynt:name (String) mandatory
+ * (mynt:documents) = mynt:documents mandatory
+ * (mynt:attachments) = mynt:attachments mandatory

[mynt:repository] > nt:hierarchyNode, mix:referenceable
- mynt:id (Long) mandatory
- mynt:name (String) mandatory
+ * (mynt:workspace) = mynt:workspace


What do I have to change in my CND file and how this affects the migration to Jackrabbit 2.1.1 ?

Thanks in advance

Regards


Juan Diego Botiva