FAQ for jackrabbit import?
tedtrippin Apr 29, 2013 5:56 AMHi,
Modeshape newbie here.
I've setup a new, simple modeshape 3.2 config and now trying to import from jackrabbit 2.4.4. I've done a system view export and now trying to import it into modeshape.
First exception I got was about a node definition (rep:AccessControllable) not existing. I created a custom CND using the jackrabbit security definitions and tried again. Now I get this...
javax.jcr.RepositoryException: Reading the node definitions from the supplied stream resulted in problems(s):
Error importing stream: Expected a valid name, but was "rep:AccessControllable"
at org.modeshape.jcr.JcrNodeTypeManager.registerNodeTypes(JcrNodeTypeManager.java:890)
I've found a couple of links explaining moving/differences jackrabbit to modeshape but nothing on transferring data. Any help much appreciated.
Config...
{
"name" : "My Repository",
"monitoring" : {
"enabled" : true
},
"workspaces" : {
"default" : "defaultWorkspace",
"allowCreation" : true
},
"storage" : {
"cacheName" : "persistentRepository",
"binaryStorage" : {
"type" : "database",
"driverClass" : "com.mysql.jdbc.Driver",
"username" : "modeshape",
"password" : "modeshape",
"url" : "jdbc:mysql://127.0.0.1:3306/modeshape?autoReconnect=true"
}
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"username" : "admin",
"useOnFailedLogin" : true
},
"providers" : []
},
}
CND...
// -----------------------------------------------------------------------------
// JACKRABBIT SECURITY - Needed for import into modeshape
// -----------------------------------------------------------------------------
[rep:AccessControllable]
mixin
+ rep:policy (rep:Policy) protected IGNORE
[rep:Policy]
abstract
[rep:ACL] > rep:Policy
orderable
+ * (rep:ACE) = rep:GrantACE protected IGNORE
[rep:ACE]
- rep:principalName (STRING) protected mandatory
- rep:privileges (NAME) protected mandatory multiple
- rep:nodePath (PATH) protected
- rep:glob (STRING) protected
- * (UNDEFINED) protected
[rep:GrantACE] > rep:ACE
[rep:DenyACE] > rep:ACE