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/06/17 17:50:40 UTC

Migration to Jackrabbit 2.1.0

Hi!

I'm migrating our Jackrabbit 1.6.0 repository to Jackrabbit 2.1.0, 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


If I have to change my CND file, this means that the data in the repository can't be migrated to Jackrabbit 2.1.0 ?

Thanks in advance

Regards


Juan Diego Botiva

 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

Re: Migration to Jackrabbit 2.1.0

Posted by Justin Edelson <ju...@gmail.com>.
On 6/17/10 11:50 AM, Juan Diego Botiva Leon wrote:
> 
> 
> If I have to change my CND file, this means that the data in the repository can't be migrated to Jackrabbit 2.1.0 ?
I don't think this is *necessarily* the case, it is dependent upon the
change you make. Changing the primary item of a node type shouldn't be a
problem with respect to the data, but I would suggest testing with the
actual data on a secondary database.

Justin

> 
> Thanks in advance
> 
> Regards
> 
> 
> Juan Diego Botiva
> 
>  		 	   		  
> _________________________________________________________________
> Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1