jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudhan <s.kan...@gmail.com>
Subject Re: nodetype.ConstraintViolationException: no matching property definition found for {}
Date Tue, 03 Apr 2007 16:34:31 GMT

I am getting  org.apache.jackrabbit.rmi.client.ClientNodeTypeManager when i
do the suggested stuff.

But i do not know how to register my cnd file for RMI client. I had
typecasted to ClientJackrabbitNodeTypeManager but again i am getting
ClassCast Exception.

is there a way to register cnd when the ws.getNodeTypeManager() is returning
ClientNodeTypeManager ??

thanks,

Sudhan


Brian Thompson-5 wrote:
> 
> 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
>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/nodetype.ConstraintViolationException%3A-no-matching-property-definition-found-for-%7B%7D-tf3391684.html#a9817964
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message