Hi Angela,

Sorry, you've been faster than me; I should search better in JIRA before 
posting here: https://issues.apache.org/jira/browse/JCR-2161

So, do you suggest me to use CndImporter instead of working with 
CompactNodeTypeDefReader?
I've taken a look at the javadoc but now I must find some examples to find out 
how to use it.

Thanks again
Ale

On Mar 30, 2011, at 12:52 PM, Angela Schreiber wrote:

> hi alessandro
> 
>> This line of code
>> JackrabbitNodeTypeManager manager =
>>            (JackrabbitNodeTypeManager) 
>> session.getWorkspace().getNodeTypeManager();
>> Throws this exception
> 
> jackrabbitnodetypemanager is deprecated as JCR 2.0 provides
> an API to register node types ...
> 
>> Caused by: java.lang.ClassCastException: 
>> org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeManagerImpl cannot be cast to 
>> org.apache.jackrabbit.api.JackrabbitNodeTypeManager
> 
> ... and not implemented by jcr2spi.*.NodeTypeManagerImpl
> 
>> Is there some other way register nodetypes from a cnd using the spi library? 
>> Am I doing something wrong elsewhere?
> 
> did you take a look at org.apache.jackrabbit.commons.cnd.CndImporter?
> 
> regards
> angela

Reply via email to