You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Nick Stuart <ns...@speranzasystems.com> on 2008/06/19 20:59:10 UTC
Cant create nodetypes
Hi all, I've looked around for this problem, but all I see related is
JCR-888, but I'm not using the IBM jdk as listed there. My jave version is:
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
I am trying to create a fairly simple custom node type with the following
cnd:
<sp='something_here'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
[sp:processMarker]
mixin
- sp:inProcess (boolean)
= 'false'
autocreated
[sp:folder] > nt:folder,sp:processMarker
[sp:resource] > nt:resource,sp:processMarker
I have two issues.
First, if i leave <sp='something_here'> as it is, I get the exception shown
in JCR-888 saying its not a registered namespace uri. Not helpful.
Second, if I try <sp=''> then I just get sp: is not a registered namespace
whenever I try to use sp:folder.
Either way I am at an roadblock here. The rest of the process has gone great
and is doing everything I need it to, but I would love to be able to add
some custom logic/info here to make things fit better.
Any ideas on what I could be doing wrong? I am using the 1.4.5 release from
maven.
Thanks!
-Nick
Re: Cant create nodetypes
Posted by Nick Stuart <ns...@speranzasystems.com>.
Stacktrace posted below. One thing to note though, is that the code that
worked with 1.5 works with 1.4.5 as well. However, I don't know where/how I
would have found that code if it wasn't posted here, as I was using the code
from the website documentation for registering node types, which does not
work at all.
-Nick
javax.jcr.NamespaceException: http://spxxx.com/test: is not a registered
namespace uri.
at
org.apache.jackrabbit.core.NamespaceRegistryImpl.getPrefix(NamespaceRegistryImpl.java:528)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.checkNamespace(NodeTypeRegistry.java:1361)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.validateNodeTypeDef(NodeTypeRegistry.java:1401)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.internalRegister(NodeTypeRegistry.java:1213)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.registerNodeType(NodeTypeRegistry.java:174)
On 6/30/08, Nick Stuart <ns...@speranzasystems.com> wrote:
>
> I know I looked at that issue when I was trying to figure out what was
> going on and I don't think it was the same. I'll recreate the stacktrace
> again though and post it. (can't believe I didn't do that before....doh!)
>
> On 6/30/08, Alexander Klimetschek <ak...@day.com> wrote:
>>
>> Do you get the exact same stacktrace as in JCR-888, ie. on
>> startup/login to the repository (when it is reading the
>> ns_*.properties files), or when you load your cnd file? Would be nice
>> if you could post them.
>>
>> Regards,
>> Alex
>>
>>
>>
>> On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart
>> <ns...@speranzasystems.com> wrote:
>>
>> > Hi all, I've looked around for this problem, but all I see related is
>> > JCR-888, but I'm not using the IBM jdk as listed there. My jave version
>> is:
>> > java version "1.6.0_06"
>> > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
>> > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
>> >
>> > I am trying to create a fairly simple custom node type with the
>> following
>> > cnd:
>> > <sp='something_here'>
>> > <nt='http://www.jcp.org/jcr/nt/1.0'>
>> >
>> > [sp:processMarker]
>> > mixin
>> > - sp:inProcess (boolean)
>> > = 'false'
>> > autocreated
>> >
>> > [sp:folder] > nt:folder,sp:processMarker
>> >
>> > [sp:resource] > nt:resource,sp:processMarker
>> >
>> >
>> > I have two issues.
>> > First, if i leave <sp='something_here'> as it is, I get the exception
>> shown
>> > in JCR-888 saying its not a registered namespace uri. Not helpful.
>> > Second, if I try <sp=''> then I just get sp: is not a registered
>> namespace
>> > whenever I try to use sp:folder.
>> > Either way I am at an roadblock here. The rest of the process has gone
>> great
>> > and is doing everything I need it to, but I would love to be able to add
>> > some custom logic/info here to make things fit better.
>> >
>> > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
>> from
>> > maven.
>> > Thanks!
>> > -Nick
>> >
>>
>>
>>
>>
>> --
>> Alexander Klimetschek
>> alexander.klimetschek@day.com
>>
>
>
Re: Cant create nodetypes
Posted by Nick Stuart <ns...@speranzasystems.com>.
I know I looked at that issue when I was trying to figure out what was going
on and I don't think it was the same. I'll recreate the stacktrace again
though and post it. (can't believe I didn't do that before....doh!)
On 6/30/08, Alexander Klimetschek <ak...@day.com> wrote:
>
> Do you get the exact same stacktrace as in JCR-888, ie. on
> startup/login to the repository (when it is reading the
> ns_*.properties files), or when you load your cnd file? Would be nice
> if you could post them.
>
> Regards,
> Alex
>
>
>
> On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart
> <ns...@speranzasystems.com> wrote:
>
> > Hi all, I've looked around for this problem, but all I see related is
> > JCR-888, but I'm not using the IBM jdk as listed there. My jave version
> is:
> > java version "1.6.0_06"
> > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
> >
> > I am trying to create a fairly simple custom node type with the following
> > cnd:
> > <sp='something_here'>
> > <nt='http://www.jcp.org/jcr/nt/1.0'>
> >
> > [sp:processMarker]
> > mixin
> > - sp:inProcess (boolean)
> > = 'false'
> > autocreated
> >
> > [sp:folder] > nt:folder,sp:processMarker
> >
> > [sp:resource] > nt:resource,sp:processMarker
> >
> >
> > I have two issues.
> > First, if i leave <sp='something_here'> as it is, I get the exception
> shown
> > in JCR-888 saying its not a registered namespace uri. Not helpful.
> > Second, if I try <sp=''> then I just get sp: is not a registered
> namespace
> > whenever I try to use sp:folder.
> > Either way I am at an roadblock here. The rest of the process has gone
> great
> > and is doing everything I need it to, but I would love to be able to add
> > some custom logic/info here to make things fit better.
> >
> > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
> from
> > maven.
> > Thanks!
> > -Nick
> >
>
>
>
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>
Re: Cant create nodetypes
Posted by Alexander Klimetschek <ak...@day.com>.
Do you get the exact same stacktrace as in JCR-888, ie. on
startup/login to the repository (when it is reading the
ns_*.properties files), or when you load your cnd file? Would be nice
if you could post them.
Regards,
Alex
On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart
<ns...@speranzasystems.com> wrote:
> Hi all, I've looked around for this problem, but all I see related is
> JCR-888, but I'm not using the IBM jdk as listed there. My jave version is:
> java version "1.6.0_06"
> Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
>
> I am trying to create a fairly simple custom node type with the following
> cnd:
> <sp='something_here'>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
> [sp:folder] > nt:folder,sp:processMarker
>
> [sp:resource] > nt:resource,sp:processMarker
>
>
> I have two issues.
> First, if i leave <sp='something_here'> as it is, I get the exception shown
> in JCR-888 saying its not a registered namespace uri. Not helpful.
> Second, if I try <sp=''> then I just get sp: is not a registered namespace
> whenever I try to use sp:folder.
> Either way I am at an roadblock here. The rest of the process has gone great
> and is doing everything I need it to, but I would love to be able to add
> some custom logic/info here to make things fit better.
>
> Any ideas on what I could be doing wrong? I am using the 1.4.5 release from
> maven.
> Thanks!
> -Nick
>
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: Cant create nodetypes
Posted by Nick Stuart <ns...@speranzasystems.com>.
Ignore that one....*smacks head* need to define the file node in my
cnd....doh!
On 6/24/08, Nick Stuart <ns...@speranzasystems.com> wrote:
>
> Using the latest snapshot with the above code and cnd file I get the
> following:
>
> java.lang.RuntimeException: Error saving file to content repository.
> at
> com.speranzasystems.jcr.jackrabbit.FileRepositoryImpl.addFile(FileRepositoryImpl.java:96)
> at
> com.speranzasystems.jcr.jackrabbit.FileRepositoryImplTest.addFile(FileRepositoryImplTest.java:60)
> at
> com.speranzasystems.jcr.jackrabbit.FileRepositoryImplTest.removeFolder(FileRepositoryImplTest.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
> at
> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
> at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
> at
> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
> at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
> at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
> at
> org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
> at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
> at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
> at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
> at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
> Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: {
> http://spxxx.com/test}file <http://spxxx.com/test%7Dfile>
> at
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getEffectiveNodeType(NodeTypeRegistry.java:1008)
> at
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getEffectiveNodeType(NodeTypeRegistry.java:469)
> at
> org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.getNodeType(NodeTypeManagerImpl.java:186)
> at
> org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.getNodeType(NodeTypeManagerImpl.java:410)
> at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:2123)
> at
> com.speranzasystems.jcr.jackrabbit.FileRepositoryImpl.addFile(FileRepositoryImpl.java:79)
> ... 28 more
>
> What am I missing here?!?! Any ideas? This seems like core functionality
> that has to be working to get even the regular nodeTypes into JR. This is
> using the default repository.xml file that gets generated if you don't have
> one...
>
> Thanks again for the help!
>
> -Nick
>
>
> On 6/20/08, Markus <ca...@gmx.net> wrote:
>>
>> Hi Nick,
>>
>> Using the latest Jackrabbit 1.5 Snapshot with this .cnd file:
>>
>> Testnodes.cnd
>> --------------------
>> <sp='http://spxxx.com/test'>
>>
>> <nt='http://www.jcp.org/jcr/nt/1.0'>
>>
>> [sp:processMarker]
>> mixin
>> - sp:inProcess (boolean)
>> = 'false'
>> autocreated
>>
>> [sp:folder] > nt:folder,sp:processMarker
>> [sp:resource] > nt:resource,sp:processMarker
>>
>> --------------------
>>
>> And the following code:
>> --------------------
>> Session session = getSession();
>> Workspace wsp = session.getWorkspace();
>> JackrabbitNodeTypeManager ntMgr = (JackrabbitNodeTypeManager)
>> wsp.getNodeTypeManager();
>>
>> // Register nodetypes
>> if (!ntMgr.hasNodeType("sp:processMarker")) {
>> ntMgr.registerNodeTypes(new FileInputStream(<testnodes.cnd file>),
>> JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
>> }
>> session.save();
>>
>> I could add the nodetypes without problems. So maybe you like to test
>> again
>> with the latest version of Jackrabbit or compare your code/cnd with this
>> one.
>>
>> Best regards,
>>
>> Markus
>>
>>
>>
>>
>> -----Original Message-----
>> From: Nick Stuart [mailto:nstuart@speranzasystems.com]
>> Sent: Thursday, June 19, 2008 9:24 PM
>> To: users@jackrabbit.apache.org
>> Subject: Re: Cant create nodetypes
>>
>> Yes, thats what the
>> <sp='something_here'> is (or at least that what I thought it was for). All
>> the examples I have seen look almost the same as what i am doing, but it
>> doesn't work. Again, my cnd file looks like this, the first line being the
>> namespace:
>>
>> <sp='something_here'>
>> <nt='http://www.jcp.org/jcr/nt/1.0'>
>>
>> [sp:processMarker]
>> mixin
>> - sp:inProcess (boolean)
>> = 'false'
>> autocreated
>>
>>
>> How is this different then say the example from
>> http://jackrabbit.apache.org/node-type-notation.html, and yet I get the
>> exception saying "something_here is not a valid namespace uri' (have tried
>> other rand http addresses as well and it doesn't work either)
>>
>> On Thu, Jun 19, 2008 at 3:15 PM, Pulla Venkat <pc...@gmail.com>
>> wrote:
>>
>> > You need to add the namespace information at the begining of CND file.
>> > Just like in xml file , namespace is specified before using , cnd file
>> also
>> > should be similar.
>> >
>> > On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart <
>> nstuart@speranzasystems.com>
>> > wrote:
>> >
>> > > Hi all, I've looked around for this problem, but all I see related is
>> > > JCR-888, but I'm not using the IBM jdk as listed there. My jave
>> version
>> > is:
>> > > java version "1.6.0_06"
>> > > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
>> > > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
>> > >
>> > > I am trying to create a fairly simple custom node type with the
>> following
>> > > cnd:
>> > > <sp='something_here'>
>> > > <nt='http://www.jcp.org/jcr/nt/1.0'>
>> > >
>> > > [sp:processMarker]
>> > > mixin
>> > > - sp:inProcess (boolean)
>> > > = 'false'
>> > > autocreated
>> > >
>> > > [sp:folder] > nt:folder,sp:processMarker
>> > >
>> > > [sp:resource] > nt:resource,sp:processMarker
>> > >
>> > >
>> > > I have two issues.
>> > > First, if i leave <sp='something_here'> as it is, I get the exception
>> > shown
>> > > in JCR-888 saying its not a registered namespace uri. Not helpful.
>> > > Second, if I try <sp=''> then I just get sp: is not a registered
>> > namespace
>> > > whenever I try to use sp:folder.
>> > > Either way I am at an roadblock here. The rest of the process has gone
>> > > great
>> > > and is doing everything I need it to, but I would love to be able to
>> add
>> > > some custom logic/info here to make things fit better.
>> > >
>> > > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
>> > from
>> > > maven.
>> > > Thanks!
>> > > -Nick
>> > >
>> >
>>
>>
>
Re: Cant create nodetypes
Posted by Nick Stuart <ns...@speranzasystems.com>.
Using the latest snapshot with the above code and cnd file I get the
following:
java.lang.RuntimeException: Error saving file to content repository.
at
com.speranzasystems.jcr.jackrabbit.FileRepositoryImpl.addFile(FileRepositoryImpl.java:96)
at
com.speranzasystems.jcr.jackrabbit.FileRepositoryImplTest.addFile(FileRepositoryImplTest.java:60)
at
com.speranzasystems.jcr.jackrabbit.FileRepositoryImplTest.removeFolder(FileRepositoryImplTest.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at
org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: {
http://spxxx.com/test}file
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getEffectiveNodeType(NodeTypeRegistry.java:1008)
at
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.getEffectiveNodeType(NodeTypeRegistry.java:469)
at
org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.getNodeType(NodeTypeManagerImpl.java:186)
at
org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.getNodeType(NodeTypeManagerImpl.java:410)
at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:2123)
at
com.speranzasystems.jcr.jackrabbit.FileRepositoryImpl.addFile(FileRepositoryImpl.java:79)
... 28 more
What am I missing here?!?! Any ideas? This seems like core functionality
that has to be working to get even the regular nodeTypes into JR. This is
using the default repository.xml file that gets generated if you don't have
one...
Thanks again for the help!
-Nick
On 6/20/08, Markus <ca...@gmx.net> wrote:
>
> Hi Nick,
>
> Using the latest Jackrabbit 1.5 Snapshot with this .cnd file:
>
> Testnodes.cnd
> --------------------
> <sp='http://spxxx.com/test'>
>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
> [sp:folder] > nt:folder,sp:processMarker
> [sp:resource] > nt:resource,sp:processMarker
>
> --------------------
>
> And the following code:
> --------------------
> Session session = getSession();
> Workspace wsp = session.getWorkspace();
> JackrabbitNodeTypeManager ntMgr = (JackrabbitNodeTypeManager)
> wsp.getNodeTypeManager();
>
> // Register nodetypes
> if (!ntMgr.hasNodeType("sp:processMarker")) {
> ntMgr.registerNodeTypes(new FileInputStream(<testnodes.cnd file>),
> JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> }
> session.save();
>
> I could add the nodetypes without problems. So maybe you like to test again
> with the latest version of Jackrabbit or compare your code/cnd with this
> one.
>
> Best regards,
>
> Markus
>
>
>
>
> -----Original Message-----
> From: Nick Stuart [mailto:nstuart@speranzasystems.com]
> Sent: Thursday, June 19, 2008 9:24 PM
> To: users@jackrabbit.apache.org
> Subject: Re: Cant create nodetypes
>
> Yes, thats what the
> <sp='something_here'> is (or at least that what I thought it was for). All
> the examples I have seen look almost the same as what i am doing, but it
> doesn't work. Again, my cnd file looks like this, the first line being the
> namespace:
>
> <sp='something_here'>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
>
> How is this different then say the example from
> http://jackrabbit.apache.org/node-type-notation.html, and yet I get the
> exception saying "something_here is not a valid namespace uri' (have tried
> other rand http addresses as well and it doesn't work either)
>
> On Thu, Jun 19, 2008 at 3:15 PM, Pulla Venkat <pc...@gmail.com> wrote:
>
> > You need to add the namespace information at the begining of CND file.
> > Just like in xml file , namespace is specified before using , cnd file
> also
> > should be similar.
> >
> > On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart <
> nstuart@speranzasystems.com>
> > wrote:
> >
> > > Hi all, I've looked around for this problem, but all I see related is
> > > JCR-888, but I'm not using the IBM jdk as listed there. My jave version
> > is:
> > > java version "1.6.0_06"
> > > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> > > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
> > >
> > > I am trying to create a fairly simple custom node type with the
> following
> > > cnd:
> > > <sp='something_here'>
> > > <nt='http://www.jcp.org/jcr/nt/1.0'>
> > >
> > > [sp:processMarker]
> > > mixin
> > > - sp:inProcess (boolean)
> > > = 'false'
> > > autocreated
> > >
> > > [sp:folder] > nt:folder,sp:processMarker
> > >
> > > [sp:resource] > nt:resource,sp:processMarker
> > >
> > >
> > > I have two issues.
> > > First, if i leave <sp='something_here'> as it is, I get the exception
> > shown
> > > in JCR-888 saying its not a registered namespace uri. Not helpful.
> > > Second, if I try <sp=''> then I just get sp: is not a registered
> > namespace
> > > whenever I try to use sp:folder.
> > > Either way I am at an roadblock here. The rest of the process has gone
> > > great
> > > and is doing everything I need it to, but I would love to be able to
> add
> > > some custom logic/info here to make things fit better.
> > >
> > > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
> > from
> > > maven.
> > > Thanks!
> > > -Nick
> > >
> >
>
>
Re: Cant create nodetypes
Posted by Nick Stuart <ns...@speranzasystems.com>.
Excellent, thanks for the info!
On 6/24/08, Marcel Reutegger <ma...@gmx.net> wrote:
>
> Nick Stuart wrote:
>
>> Is there a Maven Repository that has snapshots for Jackrabbit? I would
>> like
>> to avoid rolling our own if possible just to test this out.
>>
>
> this is the apache maven snapshot repository:
>
> http://people.apache.org/maven-snapshot-repository/
>
> regards
> marcel
>
Re: Cant create nodetypes
Posted by Marcel Reutegger <ma...@gmx.net>.
Nick Stuart wrote:
> Is there a Maven Repository that has snapshots for Jackrabbit? I would like
> to avoid rolling our own if possible just to test this out.
this is the apache maven snapshot repository:
http://people.apache.org/maven-snapshot-repository/
regards
marcel
RE: Cant create nodetypes
Posted by Markus <ca...@gmx.net>.
Hi Nick,
I don't know if there is a Maven repository but you can get the latest
builds from the Hudson Continous Integration server:
http://hudson.zones.apache.org/hudson/view/Jackrabbit/job/Jackrabbit-trunk/
Just select the latest build (i.e. #108) and the needed module (i.e.
Jackrabbit Core).
--
But checking out the latest trunk from subversion and making your own build
is not a big issue either :)
Regards,
Markus
-----Original Message-----
From: Nick Stuart [mailto:nstuart@speranzasystems.com]
Sent: Monday, June 23, 2008 4:35 PM
To: users@jackrabbit.apache.org
Subject: Re: Cant create nodetypes
Is there a Maven Repository that has snapshots for Jackrabbit? I would like
to avoid rolling our own if possible just to test this out.
Thanks again for the help!
-Nick
On 6/20/08, Markus <ca...@gmx.net> wrote:
>
> Hi Nick,
>
> Using the latest Jackrabbit 1.5 Snapshot with this .cnd file:
>
> Testnodes.cnd
> --------------------
> <sp='http://spxxx.com/test'>
>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
> [sp:folder] > nt:folder,sp:processMarker
> [sp:resource] > nt:resource,sp:processMarker
>
> --------------------
>
> And the following code:
> --------------------
> Session session = getSession();
> Workspace wsp = session.getWorkspace();
> JackrabbitNodeTypeManager ntMgr = (JackrabbitNodeTypeManager)
> wsp.getNodeTypeManager();
>
> // Register nodetypes
> if (!ntMgr.hasNodeType("sp:processMarker")) {
> ntMgr.registerNodeTypes(new FileInputStream(<testnodes.cnd file>),
> JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> }
> session.save();
>
> I could add the nodetypes without problems. So maybe you like to test
again
> with the latest version of Jackrabbit or compare your code/cnd with this
> one.
>
> Best regards,
>
> Markus
>
>
>
>
> -----Original Message-----
> From: Nick Stuart [mailto:nstuart@speranzasystems.com]
> Sent: Thursday, June 19, 2008 9:24 PM
> To: users@jackrabbit.apache.org
> Subject: Re: Cant create nodetypes
>
> Yes, thats what the
> <sp='something_here'> is (or at least that what I thought it was for). All
> the examples I have seen look almost the same as what i am doing, but it
> doesn't work. Again, my cnd file looks like this, the first line being the
> namespace:
>
> <sp='something_here'>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
>
> How is this different then say the example from
> http://jackrabbit.apache.org/node-type-notation.html, and yet I get the
> exception saying "something_here is not a valid namespace uri' (have tried
> other rand http addresses as well and it doesn't work either)
>
> On Thu, Jun 19, 2008 at 3:15 PM, Pulla Venkat <pc...@gmail.com> wrote:
>
> > You need to add the namespace information at the begining of CND file.
> > Just like in xml file , namespace is specified before using , cnd file
> also
> > should be similar.
> >
> > On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart <
> nstuart@speranzasystems.com>
> > wrote:
> >
> > > Hi all, I've looked around for this problem, but all I see related is
> > > JCR-888, but I'm not using the IBM jdk as listed there. My jave
version
> > is:
> > > java version "1.6.0_06"
> > > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> > > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
> > >
> > > I am trying to create a fairly simple custom node type with the
> following
> > > cnd:
> > > <sp='something_here'>
> > > <nt='http://www.jcp.org/jcr/nt/1.0'>
> > >
> > > [sp:processMarker]
> > > mixin
> > > - sp:inProcess (boolean)
> > > = 'false'
> > > autocreated
> > >
> > > [sp:folder] > nt:folder,sp:processMarker
> > >
> > > [sp:resource] > nt:resource,sp:processMarker
> > >
> > >
> > > I have two issues.
> > > First, if i leave <sp='something_here'> as it is, I get the exception
> > shown
> > > in JCR-888 saying its not a registered namespace uri. Not helpful.
> > > Second, if I try <sp=''> then I just get sp: is not a registered
> > namespace
> > > whenever I try to use sp:folder.
> > > Either way I am at an roadblock here. The rest of the process has gone
> > > great
> > > and is doing everything I need it to, but I would love to be able to
> add
> > > some custom logic/info here to make things fit better.
> > >
> > > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
> > from
> > > maven.
> > > Thanks!
> > > -Nick
> > >
> >
>
>
Re: Cant create nodetypes
Posted by Nick Stuart <ns...@speranzasystems.com>.
Is there a Maven Repository that has snapshots for Jackrabbit? I would like
to avoid rolling our own if possible just to test this out.
Thanks again for the help!
-Nick
On 6/20/08, Markus <ca...@gmx.net> wrote:
>
> Hi Nick,
>
> Using the latest Jackrabbit 1.5 Snapshot with this .cnd file:
>
> Testnodes.cnd
> --------------------
> <sp='http://spxxx.com/test'>
>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
> [sp:folder] > nt:folder,sp:processMarker
> [sp:resource] > nt:resource,sp:processMarker
>
> --------------------
>
> And the following code:
> --------------------
> Session session = getSession();
> Workspace wsp = session.getWorkspace();
> JackrabbitNodeTypeManager ntMgr = (JackrabbitNodeTypeManager)
> wsp.getNodeTypeManager();
>
> // Register nodetypes
> if (!ntMgr.hasNodeType("sp:processMarker")) {
> ntMgr.registerNodeTypes(new FileInputStream(<testnodes.cnd file>),
> JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> }
> session.save();
>
> I could add the nodetypes without problems. So maybe you like to test again
> with the latest version of Jackrabbit or compare your code/cnd with this
> one.
>
> Best regards,
>
> Markus
>
>
>
>
> -----Original Message-----
> From: Nick Stuart [mailto:nstuart@speranzasystems.com]
> Sent: Thursday, June 19, 2008 9:24 PM
> To: users@jackrabbit.apache.org
> Subject: Re: Cant create nodetypes
>
> Yes, thats what the
> <sp='something_here'> is (or at least that what I thought it was for). All
> the examples I have seen look almost the same as what i am doing, but it
> doesn't work. Again, my cnd file looks like this, the first line being the
> namespace:
>
> <sp='something_here'>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
>
> How is this different then say the example from
> http://jackrabbit.apache.org/node-type-notation.html, and yet I get the
> exception saying "something_here is not a valid namespace uri' (have tried
> other rand http addresses as well and it doesn't work either)
>
> On Thu, Jun 19, 2008 at 3:15 PM, Pulla Venkat <pc...@gmail.com> wrote:
>
> > You need to add the namespace information at the begining of CND file.
> > Just like in xml file , namespace is specified before using , cnd file
> also
> > should be similar.
> >
> > On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart <
> nstuart@speranzasystems.com>
> > wrote:
> >
> > > Hi all, I've looked around for this problem, but all I see related is
> > > JCR-888, but I'm not using the IBM jdk as listed there. My jave version
> > is:
> > > java version "1.6.0_06"
> > > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> > > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
> > >
> > > I am trying to create a fairly simple custom node type with the
> following
> > > cnd:
> > > <sp='something_here'>
> > > <nt='http://www.jcp.org/jcr/nt/1.0'>
> > >
> > > [sp:processMarker]
> > > mixin
> > > - sp:inProcess (boolean)
> > > = 'false'
> > > autocreated
> > >
> > > [sp:folder] > nt:folder,sp:processMarker
> > >
> > > [sp:resource] > nt:resource,sp:processMarker
> > >
> > >
> > > I have two issues.
> > > First, if i leave <sp='something_here'> as it is, I get the exception
> > shown
> > > in JCR-888 saying its not a registered namespace uri. Not helpful.
> > > Second, if I try <sp=''> then I just get sp: is not a registered
> > namespace
> > > whenever I try to use sp:folder.
> > > Either way I am at an roadblock here. The rest of the process has gone
> > > great
> > > and is doing everything I need it to, but I would love to be able to
> add
> > > some custom logic/info here to make things fit better.
> > >
> > > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
> > from
> > > maven.
> > > Thanks!
> > > -Nick
> > >
> >
>
>
RE: Cant create nodetypes
Posted by Markus <ca...@gmx.net>.
Hi Nick,
Using the latest Jackrabbit 1.5 Snapshot with this .cnd file:
Testnodes.cnd
--------------------
<sp='http://spxxx.com/test'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
[sp:processMarker]
mixin
- sp:inProcess (boolean)
= 'false'
autocreated
[sp:folder] > nt:folder,sp:processMarker
[sp:resource] > nt:resource,sp:processMarker
--------------------
And the following code:
--------------------
Session session = getSession();
Workspace wsp = session.getWorkspace();
JackrabbitNodeTypeManager ntMgr = (JackrabbitNodeTypeManager)
wsp.getNodeTypeManager();
// Register nodetypes
if (!ntMgr.hasNodeType("sp:processMarker")) {
ntMgr.registerNodeTypes(new FileInputStream(<testnodes.cnd file>),
JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
}
session.save();
I could add the nodetypes without problems. So maybe you like to test again
with the latest version of Jackrabbit or compare your code/cnd with this
one.
Best regards,
Markus
-----Original Message-----
From: Nick Stuart [mailto:nstuart@speranzasystems.com]
Sent: Thursday, June 19, 2008 9:24 PM
To: users@jackrabbit.apache.org
Subject: Re: Cant create nodetypes
Yes, thats what the
<sp='something_here'> is (or at least that what I thought it was for). All
the examples I have seen look almost the same as what i am doing, but it
doesn't work. Again, my cnd file looks like this, the first line being the
namespace:
<sp='something_here'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
[sp:processMarker]
mixin
- sp:inProcess (boolean)
= 'false'
autocreated
How is this different then say the example from
http://jackrabbit.apache.org/node-type-notation.html, and yet I get the
exception saying "something_here is not a valid namespace uri' (have tried
other rand http addresses as well and it doesn't work either)
On Thu, Jun 19, 2008 at 3:15 PM, Pulla Venkat <pc...@gmail.com> wrote:
> You need to add the namespace information at the begining of CND file.
> Just like in xml file , namespace is specified before using , cnd file
also
> should be similar.
>
> On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart <ns...@speranzasystems.com>
> wrote:
>
> > Hi all, I've looked around for this problem, but all I see related is
> > JCR-888, but I'm not using the IBM jdk as listed there. My jave version
> is:
> > java version "1.6.0_06"
> > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
> >
> > I am trying to create a fairly simple custom node type with the
following
> > cnd:
> > <sp='something_here'>
> > <nt='http://www.jcp.org/jcr/nt/1.0'>
> >
> > [sp:processMarker]
> > mixin
> > - sp:inProcess (boolean)
> > = 'false'
> > autocreated
> >
> > [sp:folder] > nt:folder,sp:processMarker
> >
> > [sp:resource] > nt:resource,sp:processMarker
> >
> >
> > I have two issues.
> > First, if i leave <sp='something_here'> as it is, I get the exception
> shown
> > in JCR-888 saying its not a registered namespace uri. Not helpful.
> > Second, if I try <sp=''> then I just get sp: is not a registered
> namespace
> > whenever I try to use sp:folder.
> > Either way I am at an roadblock here. The rest of the process has gone
> > great
> > and is doing everything I need it to, but I would love to be able to add
> > some custom logic/info here to make things fit better.
> >
> > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
> from
> > maven.
> > Thanks!
> > -Nick
> >
>
Re: Cant create nodetypes
Posted by Nick Stuart <ns...@speranzasystems.com>.
Yes, thats what the
<sp='something_here'> is (or at least that what I thought it was for). All
the examples I have seen look almost the same as what i am doing, but it
doesn't work. Again, my cnd file looks like this, the first line being the
namespace:
<sp='something_here'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
[sp:processMarker]
mixin
- sp:inProcess (boolean)
= 'false'
autocreated
How is this different then say the example from
http://jackrabbit.apache.org/node-type-notation.html, and yet I get the
exception saying "something_here is not a valid namespace uri' (have tried
other rand http addresses as well and it doesn't work either)
On Thu, Jun 19, 2008 at 3:15 PM, Pulla Venkat <pc...@gmail.com> wrote:
> You need to add the namespace information at the begining of CND file.
> Just like in xml file , namespace is specified before using , cnd file also
> should be similar.
>
> On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart <ns...@speranzasystems.com>
> wrote:
>
> > Hi all, I've looked around for this problem, but all I see related is
> > JCR-888, but I'm not using the IBM jdk as listed there. My jave version
> is:
> > java version "1.6.0_06"
> > Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
> >
> > I am trying to create a fairly simple custom node type with the following
> > cnd:
> > <sp='something_here'>
> > <nt='http://www.jcp.org/jcr/nt/1.0'>
> >
> > [sp:processMarker]
> > mixin
> > - sp:inProcess (boolean)
> > = 'false'
> > autocreated
> >
> > [sp:folder] > nt:folder,sp:processMarker
> >
> > [sp:resource] > nt:resource,sp:processMarker
> >
> >
> > I have two issues.
> > First, if i leave <sp='something_here'> as it is, I get the exception
> shown
> > in JCR-888 saying its not a registered namespace uri. Not helpful.
> > Second, if I try <sp=''> then I just get sp: is not a registered
> namespace
> > whenever I try to use sp:folder.
> > Either way I am at an roadblock here. The rest of the process has gone
> > great
> > and is doing everything I need it to, but I would love to be able to add
> > some custom logic/info here to make things fit better.
> >
> > Any ideas on what I could be doing wrong? I am using the 1.4.5 release
> from
> > maven.
> > Thanks!
> > -Nick
> >
>
Re: Cant create nodetypes
Posted by Pulla Venkat <pc...@gmail.com>.
You need to add the namespace information at the begining of CND file.
Just like in xml file , namespace is specified before using , cnd file also
should be similar.
On Thu, Jun 19, 2008 at 2:59 PM, Nick Stuart <ns...@speranzasystems.com>
wrote:
> Hi all, I've looked around for this problem, but all I see related is
> JCR-888, but I'm not using the IBM jdk as listed there. My jave version is:
> java version "1.6.0_06"
> Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
>
> I am trying to create a fairly simple custom node type with the following
> cnd:
> <sp='something_here'>
> <nt='http://www.jcp.org/jcr/nt/1.0'>
>
> [sp:processMarker]
> mixin
> - sp:inProcess (boolean)
> = 'false'
> autocreated
>
> [sp:folder] > nt:folder,sp:processMarker
>
> [sp:resource] > nt:resource,sp:processMarker
>
>
> I have two issues.
> First, if i leave <sp='something_here'> as it is, I get the exception shown
> in JCR-888 saying its not a registered namespace uri. Not helpful.
> Second, if I try <sp=''> then I just get sp: is not a registered namespace
> whenever I try to use sp:folder.
> Either way I am at an roadblock here. The rest of the process has gone
> great
> and is doing everything I need it to, but I would love to be able to add
> some custom logic/info here to make things fit better.
>
> Any ideas on what I could be doing wrong? I am using the 1.4.5 release from
> maven.
> Thanks!
> -Nick
>