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 Thu, 27 Nov 2008 12:30:00 GMT
Can you send me the full stack trace  ? What kind of repository are you
using ?
If possible, send me the complete code.

Thanks,
Christophe

On Thu, Nov 27, 2008 at 06:46, Edgar Merino <donvodka@gmail.com> wrote:

> Hello again,
>
>   I'm using v1.4, the "ocm" namespace has been registered previously:
>
>   NamespaceRegistry registry = null;
>   try {
>       registry = session.getWorkspace().getNamespaceRegistry();
>       System.out.println(registry.getURI("ocm"));             } catch
> (NamespaceException e) {         try {
>           registry.registerNamespace("ocm", "
> http://jackrabbit.apache.org/ocm");
>       } catch (Exception ex) {
>           ex.printStackTrace();                   }
>   } catch (RepositoryException e) {
>       e.printStackTrace();
>   }
>
>
>   After this, I try to register the nodetype and I get the exception shown
> previosly on the past email.
>
> What did I missed?
> Edgar Merino
>
>
>
> Christophe Lombart escribió:
>
>> 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