Thanks for the response.
  
JackrabbitNodeTypeManager is not on the class path either.  I have all the 2.0 
jars on the class path.  
For jackrabbitNodeTypeManagerImpl I get three implementations on the classpath:
//import org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeManagerImpl;
//import 
org.apache.jackrabbit.ocm.nodemanagement.impl.jackrabbit.NodeTypeManagerImpl;
import 
org.apache.jackrabbit.ocm.nodemanagement.impl.jeceira.NodeTypeManagerImpl;

Does NodeType registration work for you in 2.0?

Here are my dependencies.  

    <dependency org="org/apache" name="log4j" rev="1.2+" conf="compile"/>
    <dependency org="javax.jcr" name="jcr" rev="2.0" conf="compile"/>
    <dependency org="org/apache/jackrabbit" name="jackrabbit-jcr-commons" 
rev="2.0.0" conf="compile"/>
    <dependency org="org/apache/jackrabbit" name="jackrabbit-jcr2dav" 
rev="2.0.0" conf="compile"/>    
    <dependency org="org/apache/jackrabbit" name="jackrabbit-jcr2spi" 
rev="2.0.0" conf="compile"/>
    <dependency org="org/apache/jackrabbit" name="jackrabbit-spi" rev="2.0.0" 
conf="compile"/>
    <dependency org="org/apache/jackrabbit" name="jackrabbit-spi2dav" 
rev="2.0.0" conf="compile"/>
    <dependency org="org/apache/jackrabbit" name="jackrabbit-spi-commons" 
rev="2.0.0" conf="compile"/>
    <dependency org="org/apache/jackrabbit" name="jackrabbit-webdav" 
rev="2.0.0" conf="compile"/>
    <dependency org="org/apache/jackrabbit" name="jackrabbit-jcr-server" 
rev="2.0.0" conf="compile"/>
    <dependency org="org/apache" name="commons-httpclient" rev="3.0.1" 
conf="compile"/>
    <dependency org="org/apache" name="commons-codec" rev="1.3" conf="compile"/>
    <dependency org="org/apache" name="commons-logging" rev="1.1.1" 
conf="compile"/>
    <dependency org="org/apache" name="commons-collections" rev="3.2" 
conf="compile"/>
    <dependency org="org/slf4j" name="slf4j-api" rev="1.5.2" conf="compile"/>
    <dependency org="org/slf4j" name="slf4j-log4j12" rev="1.5.2" 
conf="compile"/>

Steve

-----Original Message-----
From: Stefan Guggisberg [mailto:[email protected]] 
Sent: Wednesday, March 03, 2010 10:44 AM
To: [email protected]
Subject: Re: NodeType creation

On Wed, Mar 3, 2010 at 5:25 PM, Birmingham, Steven
<[email protected]> wrote:
> Hello,
>
> I am trying to read a NodeType configuration from an xml file.  The example I 
> used was from the ocm test classes.
>
>                  
> jackrabbitNodeTypeManagerImpl.createNodeTypesFromConfiguration(session,
>                              new FileInputStream("./resources/Signal.xml"));
>
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader
>
> I have jcr-2.0.jar and all the other jackrabbit bundles on the class path.  
> Am I somehow missing a jar or is this method not supported anymore or changed?

try this:
http://jackrabbit.apache.org/api/2.0/org/apache/jackrabbit/api/JackrabbitNodeTypeManager.html#registerNodeTypes(java.io.InputStream,%20java.lang.String)

e.g.

((JackrabbitNodeTypeManager)
session.getNodeTypeManager()).registerNodeTypes(new
FileInputStream("./resources/Signal.xml"),
JackrabbitNodeTypeManager.TEXT_XML);

cheers
stefan
>
> Thanks,
> Steve
>
> ________________________________
> This e-mail and any files transmitted with it may be proprietary and are 
> intended solely for the use of the individual or entity to whom they are 
> addressed. If you have received this e-mail in error please notify the sender.
> Please note that any views or opinions presented in this e-mail are solely 
> those of the author and do not necessarily represent those of ITT 
> Corporation. The recipient should check this e-mail and any attachments for 
> the presence of viruses. ITT accepts no liability for any damage caused by 
> any virus transmitted by this e-mail.
>

Reply via email to