You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Ted Roeloffzen <te...@gmail.com> on 2006/11/10 08:29:59 UTC

Registering namespaces

How do I register a new namespace with JackRabbit? Do i have to include it
manually in the properties file or is there another way. I wasn't able to
find any examples or how to's on the internet.

Ted

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
Okay thanks, so that's normal behavior. But I still get an exception when
registering a new NodeType that de namespace isn't registered.

Ted

2006/11/10, Stefan Guggisberg <st...@gmail.com>:
>
> On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > And if I don't put
> > <nt = "http://www.jcp.org/jcr/nt/1.0">
> >
> > at the top of the CND file it can't use nt:base as well. Very strange is
> it
> > not?
>
> no, that's expected behaviour. every namespace used in a cnd file has to
> be
> declared,  just as every namespace used in an xml file has to be declared.
>
> >
> > Ted
> >
> > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > >
> > > I have the namespace at the top of my CND file, but I still get the
> error
> > > message.
> > >
> > > Ted
> > >
> > > 2006/11/10, Stefan Guggisberg <stefan.guggisberg@gmail.com >:
> > > >
> > > > On 11/10/06, Ted Roeloffzen <ted.roeloffzen@gmail.com > wrote:
> > > > > First i want to register the namespace, then i want to register
> some
> > > > custom
> > > > > nodetypes.
> > > > >
> > > > > JCRSessionManager.getJCRSession
> ().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
> > > >
> > > > > "http://kronos.com");
> > > > > JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");
> > > >
> > > > did you add the namespace declaration, i.e.  <kronos="
> http://kronos.com">,
> > > > at
> > > > the top of your .cnd file? for the cnd format see
> > > >
> http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> > > >
> > > >
> > > > btw: if you're using
> > > > o.a.j.api.JackrabbitNodeTypeManager#registerNodeTypes(InputStream,
> > > > String) you don't have to manually register the namespaces declared
> in
> > > > your cnd file.
> > > >
> > > > cheers
> > > > stefan
> > > >
> > > > >
> > > > > Ted
> > > > >
> > > > > 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> > > > > >
> > > > > > On 11/10/06, Ted Roeloffzen < ted.roeloffzen@gmail.com> wrote:
> > > > > > > I registered the namespace, but i still get this error.
> > > > > > >
> > > > > > > javax.jcr.NamespaceException: http://kronos.com : is not a
> > > > registered
> > > > > > > namespace uri.
> > > > > >
> > > > > > you'll have to be a bit more specific than that. what exactly
> are
> > > > you
> > > > > > trying
> > > > > > to do?
> > > > > >
> > > > > > cheers
> > > > > > stefan
> > > > > >
> > > > > > >
> > > > > > > Ted
> > > > > > >
> > > > > > > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > > > > > > >
> > > > > > > > Okay thank you very much.
> > > > > > > >
> > > > > > > > Ted
> > > > > > > >
> > > > > > > > 2006/11/10, Tobias Bocanegra < tobias.bocanegra@day.com>:
> > > > > > > > >
> > > > > > > > > take a look at:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > >
> > > >
> http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > > > > > > >
> > > > > > > > > regards, toby
> > > > > > > > >
> > > > > > > > > On 11/10/06, Ted Roeloffzen < ted.roeloffzen@gmail.com>
> wrote:
> > > > > > > > > > How do I register a new namespace with JackRabbit? Do i
> have
> > > > to
> > > > > > > > > include it
> > > > > > > > > > manually in the properties file or is there another way.
> I
> > > > wasn't
> > > > > > able
> > > > > > > > > to
> > > > > > > > > > find any examples or how to's on the internet.
> > > > > > > > > >
> > > > > > > > > > Ted
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > -----------------------------------------<
> > > > tobias.bocanegra@day.com>---
> > > > > > > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH
> -
> > > > 4001
> > > > > > Basel
> > > > > > > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > > > > > > -----------------------------------------------<
> > > > http://www.day.com>---
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
>

Re: Registering namespaces

Posted by Stefan Guggisberg <st...@gmail.com>.
On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> And if I don't put
> <nt = "http://www.jcp.org/jcr/nt/1.0">
>
> at the top of the CND file it can't use nt:base as well. Very strange is it
> not?

no, that's expected behaviour. every namespace used in a cnd file has to be
declared,  just as every namespace used in an xml file has to be declared.

>
> Ted
>
> 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> >
> > I have the namespace at the top of my CND file, but I still get the error
> > message.
> >
> > Ted
> >
> > 2006/11/10, Stefan Guggisberg <stefan.guggisberg@gmail.com >:
> > >
> > > On 11/10/06, Ted Roeloffzen <ted.roeloffzen@gmail.com > wrote:
> > > > First i want to register the namespace, then i want to register some
> > > custom
> > > > nodetypes.
> > > >
> > > > JCRSessionManager.getJCRSession().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
> > >
> > > > "http://kronos.com");
> > > > JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");
> > >
> > > did you add the namespace declaration, i.e.  <kronos=" http://kronos.com">,
> > > at
> > > the top of your .cnd file? for the cnd format see
> > > http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> > >
> > >
> > > btw: if you're using
> > > o.a.j.api.JackrabbitNodeTypeManager#registerNodeTypes(InputStream,
> > > String) you don't have to manually register the namespaces declared in
> > > your cnd file.
> > >
> > > cheers
> > > stefan
> > >
> > > >
> > > > Ted
> > > >
> > > > 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> > > > >
> > > > > On 11/10/06, Ted Roeloffzen < ted.roeloffzen@gmail.com> wrote:
> > > > > > I registered the namespace, but i still get this error.
> > > > > >
> > > > > > javax.jcr.NamespaceException: http://kronos.com : is not a
> > > registered
> > > > > > namespace uri.
> > > > >
> > > > > you'll have to be a bit more specific than that. what exactly are
> > > you
> > > > > trying
> > > > > to do?
> > > > >
> > > > > cheers
> > > > > stefan
> > > > >
> > > > > >
> > > > > > Ted
> > > > > >
> > > > > > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > > > > > >
> > > > > > > Okay thank you very much.
> > > > > > >
> > > > > > > Ted
> > > > > > >
> > > > > > > 2006/11/10, Tobias Bocanegra < tobias.bocanegra@day.com>:
> > > > > > > >
> > > > > > > > take a look at:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > >
> > > http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > > > > > >
> > > > > > > > regards, toby
> > > > > > > >
> > > > > > > > On 11/10/06, Ted Roeloffzen < ted.roeloffzen@gmail.com> wrote:
> > > > > > > > > How do I register a new namespace with JackRabbit? Do i have
> > > to
> > > > > > > > include it
> > > > > > > > > manually in the properties file or is there another way. I
> > > wasn't
> > > > > able
> > > > > > > > to
> > > > > > > > > find any examples or how to's on the internet.
> > > > > > > > >
> > > > > > > > > Ted
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > -----------------------------------------<
> > > tobias.bocanegra@day.com>---
> > > > > > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH -
> > > 4001
> > > > > Basel
> > > > > > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > > > > > -----------------------------------------------<
> > > http://www.day.com>---
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>
>

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
And if I don't put
<nt = "http://www.jcp.org/jcr/nt/1.0">

at the top of the CND file it can't use nt:base as well. Very strange is it
not?

Ted

2006/11/10, Ted Roeloffzen <te...@gmail.com>:
>
> I have the namespace at the top of my CND file, but I still get the error
> message.
>
> Ted
>
> 2006/11/10, Stefan Guggisberg <stefan.guggisberg@gmail.com >:
> >
> > On 11/10/06, Ted Roeloffzen <ted.roeloffzen@gmail.com > wrote:
> > > First i want to register the namespace, then i want to register some
> > custom
> > > nodetypes.
> > >
> > > JCRSessionManager.getJCRSession().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
> >
> > > "http://kronos.com");
> > > JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");
> >
> > did you add the namespace declaration, i.e.  <kronos=" http://kronos.com">,
> > at
> > the top of your .cnd file? for the cnd format see
> > http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> >
> >
> > btw: if you're using
> > o.a.j.api.JackrabbitNodeTypeManager#registerNodeTypes(InputStream,
> > String) you don't have to manually register the namespaces declared in
> > your cnd file.
> >
> > cheers
> > stefan
> >
> > >
> > > Ted
> > >
> > > 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> > > >
> > > > On 11/10/06, Ted Roeloffzen < ted.roeloffzen@gmail.com> wrote:
> > > > > I registered the namespace, but i still get this error.
> > > > >
> > > > > javax.jcr.NamespaceException: http://kronos.com : is not a
> > registered
> > > > > namespace uri.
> > > >
> > > > you'll have to be a bit more specific than that. what exactly are
> > you
> > > > trying
> > > > to do?
> > > >
> > > > cheers
> > > > stefan
> > > >
> > > > >
> > > > > Ted
> > > > >
> > > > > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > > > > >
> > > > > > Okay thank you very much.
> > > > > >
> > > > > > Ted
> > > > > >
> > > > > > 2006/11/10, Tobias Bocanegra < tobias.bocanegra@day.com>:
> > > > > > >
> > > > > > > take a look at:
> > > > > > >
> > > > > > >
> > > > > > >
> > > >
> > http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > > > > >
> > > > > > > regards, toby
> > > > > > >
> > > > > > > On 11/10/06, Ted Roeloffzen < ted.roeloffzen@gmail.com> wrote:
> > > > > > > > How do I register a new namespace with JackRabbit? Do i have
> > to
> > > > > > > include it
> > > > > > > > manually in the properties file or is there another way. I
> > wasn't
> > > > able
> > > > > > > to
> > > > > > > > find any examples or how to's on the internet.
> > > > > > > >
> > > > > > > > Ted
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > -----------------------------------------<
> > tobias.bocanegra@day.com>---
> > > > > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH -
> > 4001
> > > > Basel
> > > > > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > > > > -----------------------------------------------<
> > http://www.day.com>---
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
Well people, it magically works now. I didn't do anything, but i no longer
get the exception that kronos.com is not a registered namespace URI.

Ted

2006/11/14, Ted Roeloffzen <te...@gmail.com>:
>
> <kronos = 'http://kronos.com' <http://kronos.com%27>>
> <nt = 'http://www.jcp.org/jcr/nt/1.0' <http://www.jcp.org/jcr/nt/1.0%27>>
>
> [kronos:user] > nt:base
> -kronos:userId (LONG) mandatory primary
> -kronos:username (STRING) mandatory
> -kronos:Fullname (STRING)
> -kronos:email (STRING) mandatory
> -kronos:password (STRING) mandatory
> -kronos:roles (REFERENCE) mandatory multiple
>
> [kronos:role] > nt:base
> -kronos:roleId (LONG) mandatory primary
> -kronos:name (STRING) mandatory
> -kronos:description (STRING)
>
> [kronos:users] > nt:base
> +kronos:user
>
> [kronos:roles] > nt:base
> +kronos:role
>
> [kronos:plugins] > nt:base
> +kronos:plugin
>
> [kronos:plugin] > nt:base
> -kronos:pluginId (LONG) mandatory primary
> -kronos:name (STRING) mandatory
> -kronos:published (BOOLEAN) = 'false' mandatory autocreated
> -kronos:order (LONG) = '1'  mandatory autocreated
> -kronos:position (STRING) mandatory
> -kronos:pluginType (STRING) mandatory
>
>
> This is the CND File
>

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
<kronos = 'http://kronos.com'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>

[kronos:user] > nt:base
-kronos:userId (LONG) mandatory primary
-kronos:username (STRING) mandatory
-kronos:Fullname (STRING)
-kronos:email (STRING) mandatory
-kronos:password (STRING) mandatory
-kronos:roles (REFERENCE) mandatory multiple

[kronos:role] > nt:base
-kronos:roleId (LONG) mandatory primary
-kronos:name (STRING) mandatory
-kronos:description (STRING)

[kronos:users] > nt:base
+kronos:user

[kronos:roles] > nt:base
+kronos:role

[kronos:plugins] > nt:base
+kronos:plugin

[kronos:plugin] > nt:base
-kronos:pluginId (LONG) mandatory primary
-kronos:name (STRING) mandatory
-kronos:published (BOOLEAN) = 'false' mandatory autocreated
-kronos:order (LONG) = '1'  mandatory autocreated
-kronos:position (STRING) mandatory
-kronos:pluginType (STRING) mandatory


This is the CND File

Re: Registering namespaces

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 11/14/06, Ted Roeloffzen <te...@gmail.com> wrote:
> Okay, here is a small portion of the CND file. When I want to register the
> nodetypes described in this CND file, I get an error the http://kronos.com
> is not a registered namespaec URI.

Did you attach the file? Apparently it didn't make it to the mailing
list. Could you please copy it inline?

Also, it would be better if you included the entire CND file instead
of just a small portion. You can replace any sensitive information
with dummy placeholders if needed.

BR,

Jukka Zitting

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
Okay, here is a small portion of the CND file. When I want to register the
nodetypes described in this CND file, I get an error the
http://kronos.comis not a registered namespaec URI.

Ted

2006/11/10, Stefan Guggisberg <st...@gmail.com>:
>
> ted, i can't help you unless you provide more details.
> i suggest you prepare a small cnd file that demonstrates
> your issue and post it to the users list.
>
> cheers
> stefan
>
> On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > I have the namespace at the top of my CND file, but I still get the
> error
> > message.
> >
> > Ted
> >
> > 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> > >
> > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > First i want to register the namespace, then i want to register some
> > > custom
> > > > nodetypes.
> > > >
> > > > JCRSessionManager.getJCRSession
> > > ().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
> > > > "http://kronos.com");
> > > > JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");
> > >
> > > did you add the namespace declaration, i.e.  <kronos="
> http://kronos.com">,
> > > at
> > > the top of your .cnd file? for the cnd format see
> > >
> > >
> http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> > >
> > > btw: if you're using
> > > o.a.j.api.JackrabbitNodeTypeManager#registerNodeTypes(InputStream,
> > > String) you don't have to manually register the namespaces declared in
> > > your cnd file.
> > >
> > > cheers
> > > stefan
> > >
> > > >
> > > > Ted
> > > >
> > > > 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> > > > >
> > > > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > > > I registered the namespace, but i still get this error.
> > > > > >
> > > > > > javax.jcr.NamespaceException: http://kronos.com: is not a
> registered
> > > > > > namespace uri.
> > > > >
> > > > > you'll have to be a bit more specific than that. what exactly are
> you
> > > > > trying
> > > > > to do?
> > > > >
> > > > > cheers
> > > > > stefan
> > > > >
> > > > > >
> > > > > > Ted
> > > > > >
> > > > > > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > > > > > >
> > > > > > > Okay thank you very much.
> > > > > > >
> > > > > > > Ted
> > > > > > >
> > > > > > > 2006/11/10, Tobias Bocanegra <to...@day.com>:
> > > > > > > >
> > > > > > > > take a look at:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > >
> > >
> http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > > > > > >
> > > > > > > > regards, toby
> > > > > > > >
> > > > > > > > On 11/10/06, Ted Roeloffzen <te...@gmail.com>
> wrote:
> > > > > > > > > How do I register a new namespace with JackRabbit? Do i
> have
> > > to
> > > > > > > > include it
> > > > > > > > > manually in the properties file or is there another way. I
> > > wasn't
> > > > > able
> > > > > > > > to
> > > > > > > > > find any examples or how to's on the internet.
> > > > > > > > >
> > > > > > > > > Ted
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > -----------------------------------------<
> > > tobias.bocanegra@day.com>---
> > > > > > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH -
> > > 4001
> > > > > Basel
> > > > > > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > > > > > -----------------------------------------------<
> > > http://www.day.com>---
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: Registering namespaces

Posted by Stefan Guggisberg <st...@gmail.com>.
ted, i can't help you unless you provide more details.
i suggest you prepare a small cnd file that demonstrates
your issue and post it to the users list.

cheers
stefan

On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> I have the namespace at the top of my CND file, but I still get the error
> message.
>
> Ted
>
> 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> >
> > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > First i want to register the namespace, then i want to register some
> > custom
> > > nodetypes.
> > >
> > > JCRSessionManager.getJCRSession
> > ().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
> > > "http://kronos.com");
> > > JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");
> >
> > did you add the namespace declaration, i.e.  <kronos="http://kronos.com">,
> > at
> > the top of your .cnd file? for the cnd format see
> >
> > http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
> >
> > btw: if you're using
> > o.a.j.api.JackrabbitNodeTypeManager#registerNodeTypes(InputStream,
> > String) you don't have to manually register the namespaces declared in
> > your cnd file.
> >
> > cheers
> > stefan
> >
> > >
> > > Ted
> > >
> > > 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> > > >
> > > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > > I registered the namespace, but i still get this error.
> > > > >
> > > > > javax.jcr.NamespaceException: http://kronos.com: is not a registered
> > > > > namespace uri.
> > > >
> > > > you'll have to be a bit more specific than that. what exactly are you
> > > > trying
> > > > to do?
> > > >
> > > > cheers
> > > > stefan
> > > >
> > > > >
> > > > > Ted
> > > > >
> > > > > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > > > > >
> > > > > > Okay thank you very much.
> > > > > >
> > > > > > Ted
> > > > > >
> > > > > > 2006/11/10, Tobias Bocanegra <to...@day.com>:
> > > > > > >
> > > > > > > take a look at:
> > > > > > >
> > > > > > >
> > > > > > >
> > > >
> > http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > > > > >
> > > > > > > regards, toby
> > > > > > >
> > > > > > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > > > > > How do I register a new namespace with JackRabbit? Do i have
> > to
> > > > > > > include it
> > > > > > > > manually in the properties file or is there another way. I
> > wasn't
> > > > able
> > > > > > > to
> > > > > > > > find any examples or how to's on the internet.
> > > > > > > >
> > > > > > > > Ted
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > -----------------------------------------<
> > tobias.bocanegra@day.com>---
> > > > > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH -
> > 4001
> > > > Basel
> > > > > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > > > > -----------------------------------------------<
> > http://www.day.com>---
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
I have the namespace at the top of my CND file, but I still get the error
message.

Ted

2006/11/10, Stefan Guggisberg <st...@gmail.com>:
>
> On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > First i want to register the namespace, then i want to register some
> custom
> > nodetypes.
> >
> > JCRSessionManager.getJCRSession
> ().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
> > "http://kronos.com");
> > JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");
>
> did you add the namespace declaration, i.e.  <kronos="http://kronos.com">,
> at
> the top of your .cnd file? for the cnd format see
>
> http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html
>
> btw: if you're using
> o.a.j.api.JackrabbitNodeTypeManager#registerNodeTypes(InputStream,
> String) you don't have to manually register the namespaces declared in
> your cnd file.
>
> cheers
> stefan
>
> >
> > Ted
> >
> > 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> > >
> > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > I registered the namespace, but i still get this error.
> > > >
> > > > javax.jcr.NamespaceException: http://kronos.com: is not a registered
> > > > namespace uri.
> > >
> > > you'll have to be a bit more specific than that. what exactly are you
> > > trying
> > > to do?
> > >
> > > cheers
> > > stefan
> > >
> > > >
> > > > Ted
> > > >
> > > > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > > > >
> > > > > Okay thank you very much.
> > > > >
> > > > > Ted
> > > > >
> > > > > 2006/11/10, Tobias Bocanegra <to...@day.com>:
> > > > > >
> > > > > > take a look at:
> > > > > >
> > > > > >
> > > > > >
> > >
> http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > > > >
> > > > > > regards, toby
> > > > > >
> > > > > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > > > > How do I register a new namespace with JackRabbit? Do i have
> to
> > > > > > include it
> > > > > > > manually in the properties file or is there another way. I
> wasn't
> > > able
> > > > > > to
> > > > > > > find any examples or how to's on the internet.
> > > > > > >
> > > > > > > Ted
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > -----------------------------------------<
> tobias.bocanegra@day.com>---
> > > > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH -
> 4001
> > > Basel
> > > > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > > > -----------------------------------------------<
> http://www.day.com>---
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: Registering namespaces

Posted by Stefan Guggisberg <st...@gmail.com>.
On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> First i want to register the namespace, then i want to register some custom
> nodetypes.
>
> JCRSessionManager.getJCRSession().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
> "http://kronos.com");
> JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");

did you add the namespace declaration, i.e.  <kronos="http://kronos.com">, at
the top of your .cnd file? for the cnd format see
http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html

btw: if you're using
o.a.j.api.JackrabbitNodeTypeManager#registerNodeTypes(InputStream,
String) you don't have to manually register the namespaces declared in
your cnd file.

cheers
stefan

>
> Ted
>
> 2006/11/10, Stefan Guggisberg <st...@gmail.com>:
> >
> > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > I registered the namespace, but i still get this error.
> > >
> > > javax.jcr.NamespaceException: http://kronos.com: is not a registered
> > > namespace uri.
> >
> > you'll have to be a bit more specific than that. what exactly are you
> > trying
> > to do?
> >
> > cheers
> > stefan
> >
> > >
> > > Ted
> > >
> > > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > > >
> > > > Okay thank you very much.
> > > >
> > > > Ted
> > > >
> > > > 2006/11/10, Tobias Bocanegra <to...@day.com>:
> > > > >
> > > > > take a look at:
> > > > >
> > > > >
> > > > >
> > http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > > >
> > > > > regards, toby
> > > > >
> > > > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > > > How do I register a new namespace with JackRabbit? Do i have to
> > > > > include it
> > > > > > manually in the properties file or is there another way. I wasn't
> > able
> > > > > to
> > > > > > find any examples or how to's on the internet.
> > > > > >
> > > > > > Ted
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > -----------------------------------------< tobias.bocanegra@day.com>---
> > > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001
> > Basel
> > > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > > -----------------------------------------------< http://www.day.com>---
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
>

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
First i want to register the namespace, then i want to register some custom
nodetypes.

JCRSessionManager.getJCRSession().getWorkspace().getNamespaceRegistry().registerNamespace("kronos",
"http://kronos.com");
JCRSessionManager.insertNodeTypeDefinition("NodeType.cnd");

Ted

2006/11/10, Stefan Guggisberg <st...@gmail.com>:
>
> On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > I registered the namespace, but i still get this error.
> >
> > javax.jcr.NamespaceException: http://kronos.com: is not a registered
> > namespace uri.
>
> you'll have to be a bit more specific than that. what exactly are you
> trying
> to do?
>
> cheers
> stefan
>
> >
> > Ted
> >
> > 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> > >
> > > Okay thank you very much.
> > >
> > > Ted
> > >
> > > 2006/11/10, Tobias Bocanegra <to...@day.com>:
> > > >
> > > > take a look at:
> > > >
> > > >
> > > >
> http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > > >
> > > > regards, toby
> > > >
> > > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > > How do I register a new namespace with JackRabbit? Do i have to
> > > > include it
> > > > > manually in the properties file or is there another way. I wasn't
> able
> > > > to
> > > > > find any examples or how to's on the internet.
> > > > >
> > > > > Ted
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > -----------------------------------------< tobias.bocanegra@day.com>---
> > > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001
> Basel
> > > > T +41 61 226 98 98, F +41 61 226 98 97
> > > > -----------------------------------------------< http://www.day.com>---
> > > >
> > >
> > >
> >
> >
>

Re: Registering namespaces

Posted by Stefan Guggisberg <st...@gmail.com>.
On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> I registered the namespace, but i still get this error.
>
> javax.jcr.NamespaceException: http://kronos.com: is not a registered
> namespace uri.

you'll have to be a bit more specific than that. what exactly are you trying
to do?

cheers
stefan

>
> Ted
>
> 2006/11/10, Ted Roeloffzen <te...@gmail.com>:
> >
> > Okay thank you very much.
> >
> > Ted
> >
> > 2006/11/10, Tobias Bocanegra <to...@day.com>:
> > >
> > > take a look at:
> > >
> > >
> > > http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> > >
> > > regards, toby
> > >
> > > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > > How do I register a new namespace with JackRabbit? Do i have to
> > > include it
> > > > manually in the properties file or is there another way. I wasn't able
> > > to
> > > > find any examples or how to's on the internet.
> > > >
> > > > Ted
> > > >
> > > >
> > >
> > >
> > > --
> > > -----------------------------------------< tobias.bocanegra@day.com >---
> > > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> > > T +41 61 226 98 98, F +41 61 226 98 97
> > > -----------------------------------------------< http://www.day.com >---
> > >
> >
> >
>
>

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
I registered the namespace, but i still get this error.

javax.jcr.NamespaceException: http://kronos.com: is not a registered
namespace uri.

Ted

2006/11/10, Ted Roeloffzen <te...@gmail.com>:
>
> Okay thank you very much.
>
> Ted
>
> 2006/11/10, Tobias Bocanegra <to...@day.com>:
> >
> > take a look at:
> >
> >
> > http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
> >
> > regards, toby
> >
> > On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > > How do I register a new namespace with JackRabbit? Do i have to
> > include it
> > > manually in the properties file or is there another way. I wasn't able
> > to
> > > find any examples or how to's on the internet.
> > >
> > > Ted
> > >
> > >
> >
> >
> > --
> > -----------------------------------------< tobias.bocanegra@day.com >---
> > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> > T +41 61 226 98 98, F +41 61 226 98 97
> > -----------------------------------------------< http://www.day.com >---
> >
>
>

Re: Registering namespaces

Posted by Ted Roeloffzen <te...@gmail.com>.
Okay thank you very much.

Ted

2006/11/10, Tobias Bocanegra <to...@day.com>:
>
> take a look at:
>
>
> http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html
>
> regards, toby
>
> On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > How do I register a new namespace with JackRabbit? Do i have to include
> it
> > manually in the properties file or is there another way. I wasn't able
> to
> > find any examples or how to's on the internet.
> >
> > Ted
> >
> >
>
>
> --
> -----------------------------------------< tobias.bocanegra@day.com >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---
>

Re: Registering namespaces

Posted by Tobias Bocanegra <to...@day.com>.
take a look at:

http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html

regards, toby

On 11/10/06, Ted Roeloffzen <te...@gmail.com> wrote:
> How do I register a new namespace with JackRabbit? Do i have to include it
> manually in the properties file or is there another way. I wasn't able to
> find any examples or how to's on the internet.
>
> Ted
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---