I'm trying to load a CND file with the definition of some custom nodetypes. The file looks like this
<ca = 'http://www.stuff.com/training'>
[ca:article]
- ca:headline (string)
mandatory
- ca:body (string)
mandatory
Here's the class to load the nodetypes
public class JcrRegisterNodeTypes {
public static void RegisterCustomNodeTypes(Session session, String cndFileName){
NodeType[] nodeTypes;
try {
File file = new File(cndFileName);
FileReader fr = new FileReader(file);
nodeTypes = CndImporter.registerNodeTypes(fr, session);
for (NodeType nt : nodeTypes) {
System.out.println("Registered: " + nt.getName());
}
} catch (InvalidNodeTypeDefinitionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NodeTypeExistsException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnsupportedRepositoryOperationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RepositoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Then "parse exception" is raised, with this message
10:37:23,052 ERROR [stderr] (default task-48) org.apache.jackrabbit.commons.cnd.ParseException: javax.jcr.UnsupportedRepositoryOperationException: TODO: JCR-3206 (cnd input stream, line 2)
It seems that the method is not implemented for RMI. Is there an alternative method to generate the /node types/custom_node_types.xml?
I've deployed jackrabbit-webapp-2.18.4.war over WildFly 14 and i can upload/download files, so i think the installation is running ok.
The jars included on the project are the last stable release
jackrabbit-api-2.18.4.jar jackrabbit-core-2.18.4.jar jackrabbit-jcr-commons-2.18.4.jar jackrabbit-jcr-rmi-2.18.4.jar jcr-2.0.jar