jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lustig <tho...@futuredesign.at>
Subject Registering new Nodetypes - NodeTypeManagerImpl cannot be cast to JackrabbitNodeTypeManager
Date Sun, 15 Aug 2010 12:11:55 GMT
Hi all,

I am using Jackrabbit 2.1 and i want to add additional properties to my 
Filenodes nt:file.
For example i would like to store a Reference ID to the corresponding
a new Property like "mynamespace:myreferenceID"

I thought that this would be a standard usecase in Jackrabbit to definde 
and use own nodetypes but till now i was not able to get it working.

I used this example directly from Jackrabbit site:

........ snippet ....
JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
         // Register the custom node types defined in the CND file
         manager.registerNodeTypes(new FileInputStream(cndFileName),

when i run this, i get the following Error:
org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeManagerImpl cannot be 
cast to org.apache.jackrabbit.api.JackrabbitNodeTypeManager

Could anyone provide me a working example for registering nodetypes 
directly on serverside? This world be really great help.

Thanking you very much in advance for supporting me

best regards

View raw message