On Thu, Jun 12, 2008 at 6:56 PM, viz06 <[EMAIL PROTECTED]> wrote:
> Issue 1) While attempting registering nodeType (mypc.cnd file) I get the
> exception 'mypc' is not a registered namespace prefix.

The namespaces have to be registered before you import node type
definition files. The namespace declarations in the cnd file are not
automatically registered.

> What is the standard way of registering namespaces?

Doing it with the standard JCR API:

NamespaceRegistry registry = session.getWorkspace().getNamespaceRegistry();
registry.registerNamespace("ns", "http://server.com/my-namespace/";);

Note that re-registering an existing namespace gives an exception.
Also see the Javadocs:
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html

In the case of the spring jcr module, the namespaces can be defined in
the spring config - which you already did. Maybe the additional
parameters like "forceNamespacesRegistration" are important
(https://springmodules.dev.java.net/docs/reference/0.8/html/jcr.html).

Regards,
Alex

-- 
Alexander Klimetschek
[EMAIL PROTECTED]

Reply via email to