jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: ClassCastException on NodeTypeManagerImpl
Date Wed, 30 Mar 2011 10:52:57 GMT
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