jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Allan (ASD)" <da...@allansoftwaredesign.co.uk>
Subject Re: proble registering NodeType's with CND file
Date Tue, 07 Mar 2006 09:09:06 GMT
If your error is

  Invalid namespace reference in a node type definition: no prefix
declared for URI: <insert your namespace 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 <senagbe@gmail.com> 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
> > <nt:='http://www.jcp.org/jcr/nt/1.0' <http://www.jcp.org/jcr/nt/1.0%27>>
> > <mix='http://www.jcp.org/jcr/mix/1.0' <http://www.jcp.org/jcr/mix/1.0%27>>
> >
> > <jdepot = 'http://epo.org/jdepot' <http://epo.org/jdepot%27>>
> >
> >
> > /* 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:
> > >
> > > <mix='http://www.jcp.org/jcr/mix/1.0'<http://www.jcp.org/jcr/mix/1.0%27>
> > > >
> > >
> > > 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
> > > > <ns = 'http://epo.org/jdepot' <http://epo.org/jdepot%27>>
> > > >
> > > > // 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
> > > .<init>(
> > > > CompactNodeTypeDefReader.java:168)
> > > >         at
> > > > org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader
> > > .<init>(
> > > > 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 >---
> > >
> >
> >


Mime
View raw message