Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 82050 invoked from network); 7 Mar 2006 09:09:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Mar 2006 09:09:30 -0000 Received: (qmail 81326 invoked by uid 500); 7 Mar 2006 09:09:29 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 81315 invoked by uid 99); 7 Mar 2006 09:09:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2006 01:09:29 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [212.227.126.171] (HELO moutng.kundenserver.de) (212.227.126.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2006 01:09:28 -0800 Received: from [84.12.29.6] (helo=[192.168.1.12]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1FGYBl2E68-0003C7; Tue, 07 Mar 2006 10:09:06 +0100 Subject: Re: proble registering NodeType's with CND file From: "David Allan (ASD)" Reply-To: david@allansoftwaredesign.co.uk To: jackrabbit-dev@incubator.apache.org In-Reply-To: References: <8be731880603021300j55a3b18bib2a137bbd180d7f8@mail.gmail.com> Content-Type: text/plain Organization: Allan Software Design Limited Message-Id: <1141722546.12121.128.camel@rigel.mentalic.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 07 Mar 2006 09:09:06 +0000 Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de login:dc8ec83d50a0e159ba5775246bf667de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N If your error is Invalid namespace reference in a node type definition: no prefix declared for URI: then most likely you have not added the namespace in the workspace namespace registry before the CND import. I do this programmatically before my CND import on a fresh workspace. David On Tue, 2006-03-07 at 09:00, Sena Gbeckor-Kove wrote: > Ok I've now figured out that it was a problem with my typing nt:= rather > than nt= however I'm still having problems registering NodeTypes, can > somebody please give me a an example, cod and CND? > > Thanks in advance. > > On 06/03/06, Sena Gbeckor-Kove wrote: > > > > Hi Tobias, > > > > Thanks that would appear to be the problem, however now I have another > > problem :) > > > > My CND file now reads (pasted file contents underneath), however I now get > > an error on parseing nt:base. What am I missing? Looking through the spec I > > thought that both the mix and nt namespaces where supposed to already be > > available. > > > > Thanks > > > > /* The JDepot Node Type Definitions expressed in CND */ > > > > // Namespace declarations > > > > > > > > > > > > > > > > > /* JDepot specific NodeTypes */ > > //depot > > [jdepot:depot] > nt:base,mix:referenceable > > > > //category > > [jdepot:category] > jdepot:depot > > > > // group > > [jdepot:group] > jdepot:depot > > > > // artefact > > [jdepot:artefact] > jdepot:depot,mix:versionable > > > > On 02/03/06, Tobias Bocanegra < tobias.bocanegra@day.com > wrote: > > > > > > just a wild guess: you probably also need to defined the 'mix' > > > namespace: > > > > > > > > > > > > > > > > regards, toby > > > > > > On 3/2/06, Sena Gbeckor-Kove < senagbe@gmail.com> wrote: > > > > Hi, > > > > > > > > II am trying o register NodeType's from a CND file. I am using code > > > > identical to the example in the JackRabbit documentation to load a CND > > > file. > > > > However I am getting a parseing error from the Lexer. As far as II can > > > tell > > > > my (very simple) CND file should work. Could somebody please have a > > > look? > > > > > > > > The CND in question is a s follows line 10 referred to in the > > > exception is > > > > the last one : > > > > > > > > /* The JDepot Node Type Definitions expressed in CND */ > > > > > > > > // Namespace declaration > > > > > > > > > > > > > // Name > > > > [ns:depot] > > > > > > > > // Supertypes > > > > > mix:referenceable > > > > > > > > The following exception is reported : > > > > > > > > org.apache.jackrabbit.core.nodetype.compact.ParseException: Error > > > while > > > > parsing 'mix:referencable' (src/test/config/depot.cnd, line 10) > > > > at org.apache.jackrabbit.core.nodetype.compact.Lexer.fail( > > > Lexer.java > > > > :147) > > > > at > > > > > > > org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.toQName > > > > (CompactNodeTypeDefReader.java :641) > > > > at > > > > > > > org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.doSuperClasses > > > > (CompactNodeTypeDefReader.java:283) > > > > at > > > > > > > org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.parse( > > > > CompactNodeTypeDefReader.java:204) > > > > at > > > > org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader > > > .( > > > > CompactNodeTypeDefReader.java:168) > > > > at > > > > org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader > > > .( > > > > CompactNodeTypeDefReader.java:153) > > > > at org.epo.jdepot.depot.Depot.RegisterCustomNodeTypes( > > > Depot.java > > > > :301) > > > > at org.epo.jdepot.depot.DepotTest.testRegisterCustomNodeType( > > > > DepotTest.java:106) > > > > 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 :585) > > > > at junit.framework.TestCase.runTest(TestCase.java:154) > > > > at junit.framework.TestCase.runBare(TestCase.java:127) > > > > at junit.framework.TestResult$1.protect(TestResult.java:106) > > > > at junit.framework.TestResult.runProtected(TestResult.java > > > :124) > > > > at junit.framework.TestResult.run(TestResult.java:109) > > > > at junit.framework.TestCase.run(TestCase.java:118) > > > > at junit.framework.TestSuite.runTest(TestSuite.java:208) > > > > at junit.framework.TestSuite.run(TestSuite.java:203) > > > > 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:585) > > > > at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit > > > ( > > > > JUnitBattery.java:242) > > > > at org.apache.maven.surefire.battery.JUnitBattery.execute( > > > > JUnitBattery.java :216) > > > > at org.apache.maven.surefire.Surefire.executeBattery( > > > Surefire.java > > > > :215) > > > > at org.apache.maven.surefire.Surefire.run(Surefire.java:163) > > > > at org.apache.maven.surefire.Surefire.run (Surefire.java:87) > > > > 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:585) > > > > at org.apache.maven.surefire.SurefireBooter.runTestsInProcess( > > > > SurefireBooter.java:285) > > > > at org.apache.maven.surefire.SurefireBooter.run( > > > SurefireBooter.java > > > > :201) > > > > at org.apache.maven.test.SurefirePlugin.execute( > > > SurefirePlugin.java > > > > :366) > > > > at org.apache.maven.plugin.DefaultPluginManager.executeMojo( > > > > DefaultPluginManager.java:415) > > > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals( > > > > DefaultLifecycleExecutor.java :531) > > > > at > > > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle > > > > (DefaultLifecycleExecutor.java:472) > > > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal ( > > > > DefaultLifecycleExecutor.java:451) > > > > at > > > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures > > > > (DefaultLifecycleExecutor.java:303) > > > > at > > > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( > > > > DefaultLifecycleExecutor.java:270) > > > > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute > > > ( > > > > DefaultLifecycleExecutor.java :139) > > > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java > > > :322) > > > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java > > > :115) > > > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:249) > > > > 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:585) > > > > at org.codehaus.classworlds.Launcher.launchEnhanced ( > > > Launcher.java > > > > :315) > > > > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > > > > at org.codehaus.classworlds.Launcher.mainWithExitCode( > > > Launcher.java > > > > :430) > > > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > > > Caused by: org.apache.jackrabbit.name.UnknownPrefixException: mix > > > > at org.apache.jackrabbit.name.QName.fromJCRName(QName.java > > > :597) > > > > at > > > > > > > org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.toQName > > > > (CompactNodeTypeDefReader.java:636) > > > > ... 52 more > > > > > > > > > > > > > > > > > -- > > > -----------------------------------------< 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 >--- > > > > > > >