jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ista Pouss <ista...@gmail.com>
Subject namespace session or worspace ?
Date Wed, 28 Dec 2011 10:41:32 GMT
Hi,

I have this code :

    try
    {
      session.getNamespaceURI("xyz");
    }
    catch (NamespaceException notexist)
    {
      session.getWorkspace().getNamespaceRegistry(). // BING !
        registerNamespace(
        "xyz", "http://www.foo.com");
    }


... but, at line BING, I get this exception :

javax.jcr.NamespaceException: failed to register namespace xyz ->
http://www.foo.com: mapping already exists
    at
org.apache.jackrabbit.core.NamespaceRegistryImpl.registerNamespace(NamespaceRegistryImpl.java:406)
    at
org.apache.jackrabbit.core.session.SessionContext$PermissionAwareNamespaceRegistry.registerNamespace(SessionContext.java:375)


How is it possilbe ? What is the good thing to do to register a namespace ?

Thanks.

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