jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: OCM ocm:discriminator NodeType
Date Wed, 26 Nov 2008 15:32:25 GMT
You have to register the "ocm" namespace before.
Which OCM version are you using ?

Christophe


On Wed, Nov 26, 2008 at 15:26, Edgar Merino <donvodka@gmail.com> wrote:

> Hello,
>
>   I'm trying to get OCM running, however I'm encountering a problem when
> trying to register the ocm:discriminator nodetype:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:jcr="
> http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0">
>   <nodeType name="ocm:discriminator" isMixin="true">
>       <supertypes>
>           <supertype>nt:base</supertype>
>       </supertypes>
>       <propertyDefinition name="ocm:classname" requiredType="String"
>           autoCreated="false" mandatory="true" onParentVersion="COPY"
>           protected="false" multiple="false" />
>   </nodeType>
> </nodeTypes>
>
>   I get the following exceptions:
>
> org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException: Invalid
> namespace reference in a node type definition       Caused by:
> javax.jcr.NamespaceException: Unknown namespace prefix ocm.
>       at
> org.apache.jackrabbit.core.nodetype.xml.AdditionalNamespaceResolver.getURI(AdditionalNamespaceResolver.java:86)
>       at
> org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:116)
>       at
> org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:62)
>       at
> org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQName(DefaultNamePathResolver.java:61)
>       at
> org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.getNodeTypeDef(NodeTypeReader.java:139)
>       at
> org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.getNodeTypeDefs(NodeTypeReader.java:122)
>       at
> org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.read(NodeTypeReader.java:69)
>       ... 5 more
>
>   However, I've already register the ocm namespace prefix, calling
> NamespaceRegistry#getURI("ocm") returns "http://jackrabbit.apache.org/ocm".
> Am I missing something here?
>
> Thanks in advance,
> Edgar Merino
>

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