jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject Re: NTD and prefixed names -> sharepoint
Date Tue, 12 Aug 2008 18:30:56 GMT
>>No, it is no "must", you can have node and property names without
>>namespace prefixes. So you can always use Property p =
>>n.getProperty("myprop");

Well, If i define my ntd as:

<acme = 'http://www.acme.com/coyote/1.0'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>

[acme:Plan] > nt:folder
  + 'acme:Anvil' (nt:unstructured)
  + 'acme:Bomb' (nt:unstructured)
  + 'acme:Painted Doorway' (nt:unstructured)


and register this ntd, all is well with the world.

If however, i use an ntd as:


<acme = 'http://www.acme.com/coyote/1.0'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>

[acme:Plan] > nt:folder
  + 'Anvil' (nt:unstructured)
  + 'Bomb' (nt:unstructured)
  + 'Painted Doorway' (nt:unstructured)

When i attempt to register node types i get:

java.lang.Exception: Failed to register node types
	at Acme.ensureNodeTypeDefs(Acme.java:119)
	at Acme.main(Acme.java:31)
Caused by: org.apache.jackrabbit.core.nodetype.compact.ParseException: Error while parsing
'Anvil' (Acme, line 6)
	at org.apache.jackrabbit.core.nodetype.compact.Lexer.fail(Lexer.java:152)
	at org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.toQName(CompactNodeTypeDefReader.java:653)
	at org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.doChildNodeDefinition(CompactNodeTypeDefReader.java:548)
	at org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.doItemDefs(CompactNodeTypeDefReader.java:360)
	at org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.parse(CompactNodeTypeDefReader.java:218)
	at org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.<init>(CompactNodeTypeDefReader.java:178)
	at org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.<init>(CompactNodeTypeDefReader.java:162)
	at Acme.ensureNodeTypeDefs(Acme.java:93)
	... 1 more
Caused by: javax.jcr.NamespaceException: No URI for pefix '' declared.
	at org.apache.jackrabbit.spi.commons.namespace.NamespaceMapping.getURI(NamespaceMapping.java:74)
	at org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:116)
	at org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:62)
	at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQName(DefaultNamePathResolver.java:61)
	at org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.toQName(CompactNodeTypeDefReader.java:646)
	... 7 more




Mime
View raw message