jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: ClientNodeTypeManager cannot be cast to JackrabbitNodeTypeManager
Date Mon, 16 Aug 2010 10:52:47 GMT
I think node type management is not yet supported in
jackrabbit-jcr-rmi for JCR 2.0. See also
https://issues.apache.org/jira/browse/JCRRMI-26

Regards,
Alex

On Mon, Aug 16, 2010 at 10:42, Thomas Lustig <thomas@futuredesign.at> wrote:
> Hi all,
>
> I am using Jackrabbit 2.1 connecting to server via RMI:
>
> ........ snippet ....
> repository = new RMIRemoteRepository("//localhost/jackrabbit.repository");
> ........
>
> I used this example directly from Jackrabbit site:
> http://jackrabbit.apache.org/node-types.html#NodeTypes-RegisteringNodeTypes
>
> ........ snippet ....
> JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
>               session.getWorkspace().getNodeTypeManager();
>        // Register the custom node types defined in the CND file
>        manager.registerNodeTypes(new FileInputStream(cndFileName),
>               JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> ........
>
> when i run this, i get the following Error:
> java.lang.ClassCastException:
> org.apache.jackrabbit.rmi.client.ClientNodeTypeManager cannot be cast to
> org.apache.jackrabbit.api.JackrabbitNodeTypeManager
>
> I read that it is important to use ServerAdapterFactory and
> ClientAdapterFactory classes, but i do not know how.
> Can anyone tell me how to get the ebove code working?
>
> Please help me, its very important for me to register new node types
>
> best regards
> thomas
>
>
>



-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message