jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eknath Kadam <eknathka...@yahoo.com>
Subject Registering a custom node
Date Thu, 21 Sep 2006 14:08:27 GMT
Hi,
I am connecting to a remote repository using jnp and trying to register my own 
node type. But following code throws ClassCastException at line 8.


1 public void registerNodeType(NodeTypeDef nodeTypeDef, Session session) 
throws RepositoryException
2    {
3        //NodeTypeRegistry object
4        Workspace wsp = session.getWorkspace();
5        NodeTypeManager ntMgr = wsp.getNodeTypeManager();
6        
7        //non-JSR 170 - jackrabbit specific
8        NodeTypeRegistry ntReg = 
                ((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry();
9        ntReg.registerNodeType(nodeTypeDef);
10    }


Thanks in advance
Eknath




Mime
View raw message