jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Novarini <a.novar...@sourcesense.com>
Subject Re: ClassCastException on NodeTypeManagerImpl
Date Wed, 30 Mar 2011 11:05:34 GMT
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


Mime
View raw message