hi ale,

funny that you run into this right when we have the same issue. we need
node type registering over the spi as well, see thread "jcr remoting
davex: register node type"

uwe came up with a simple workaround for now

- run "java -jar jackrabbit-standalone-2.2.4.jar --cli file://<path to
your repository>"
- enter "registernodetype <path tp phpcr.cnd>"
- enter "quit"
- start your server again ...

phpcr.cnd is a cnd file, attached the example that we used.

we will try to implement this so it can be used over the remoting api.
if you have any help to offer, you are very welcome of course :-)

cheers,
david

Am 30.03.2011 13:05, schrieb Alessandro Novarini:
> 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
> 

-- 
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
<phpcr='http://www.doctrine-project.org/phpcr-odm'>
[phpcr:managed]
  mixin
  - phpcr:alias (STRING)

Reply via email to