jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Thompson" <elephant...@gmail.com>
Subject Re: nodetype.ConstraintViolationException: no matching property definition found for {}
Date Mon, 02 Apr 2007 23:07:51 GMT
What does

session.getWorkspace().getNodeTypeManager().getClass();

show you?

That should help you pin down that ClassCastException.



On 4/2/07, Sudhan <s.kanade@gmail.com> wrote:
>
>
> Hi,
>
> I created a cnd file exactly given in
> http://jackrabbit.apache.org/doc/nodetype/cnd.html
>
> But when i follow the code :
>
> Session session = ...;
>     JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
>         session.getWorkspace().getNodeTypeManager();
>     // only register the type if it does not yet exist
>     if (!manager.hasNodeType("myfile")) {
>         manager.registerNodeTypes(
>             JackrabbitNodeTypeManager.TEXT_X_JCR_CND,
>             <InputStream for reading your CND file>);
>     }
>
>
> I am getting ClassCastException :
>
> java.lang.ClassCastException:
> org.apache.jackrabbit.rmi.client.ClientNodeTypeManager
>
> Am I missing something before getting JackrabbitNodeTypeManager instance.
>
> thanks,
>
> Sudhan
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message