Hi

I'm trying to register node types i have written in cnd to a JCR repository
on RMI.

I have trouble to find any documentation about the jackrabbit-jcr-rmi jar.

Do I have to use the class ClientJackrabbitNodeTypeManager and give it a
filename knowing that this piece of code give me an exception :

       // Read in the CND file
       FileInputStream fis = new FileInputStream(cndFileName);

       ClientJackrabbitNodeTypeManager ntmgr
=(ClientJackrabbitNodeTypeManager) ws.getNodeTypeManager();

       ntmgr.registerNodeTypes(fis, "toto");

The exception :

java.lang.ClassCastException:
org.apache.jackrabbit.rmi.client.ClientNodeTypeManager cannot be cast to
org.apache.jackrabbit.rmi.jackrabbit.ClientJackrabbitNodeTypeManager
   at tips.jcr.NodeTypeRegister.registerCustomNodeTypes(
NodeTypeRegister.java:55)
   at tips.jcr.NodeTypeRegister.registerCustomNodeTypesInDefault(
NodeTypeRegister.java:47)
   at tips.jcr.NodeTypeRegister.main(NodeTypeRegister.java:105)

Thank you

Nicolas Dufour

Reply via email to