jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: NodeType creation
Date Wed, 03 Mar 2010 17:44:02 GMT
On Wed, Mar 3, 2010 at 5:25 PM, Birmingham, Steven
<Steven.Birmingham@itt.com> 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.
>

Mime
View raw message