jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacco van Weert" <1111softw...@gmail.com>
Subject Re: Parse Exception while registering node types
Date Wed, 02 May 2007 10:04:23 GMT
Hello,

You also defined the namespaces at the start of the CND file?

e.g.

<nt = 'http://www.jcp.org/jcr/nt/1.0'>
<mix = 'http://www.jcp.org/jcr/mix/1.0'>
<repro = 'http://www........'>


On 5/2/07, Kalyan Sarkar <kalyansarkar108@yahoo.co.in> wrote:
>
>
> Hello everybody,
> I am getting a ParseException when I try to create a
> CompactNodeTypeDefReader instance.
>
> org.apache.jackrabbit.core.nodetype.compact.ParseException: Error while
> parsing 'repro:base' (reproNodeType.cnd
> , line 1)
>         at
> org.apache.jackrabbit.core.nodetype.compact.Lexer.fail(Lexer.java:152)
>         at
>
> org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.toQName
> (CompactNodeTypeDefReade
> r.java:637)
>         at
>
> org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.doNodeTypeName
> (CompactNodeTypeD
> efReader.java:255)
>         at
> org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader.parse
> (CompactNodeTypeDefReader.
> java:205)
>         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
> com.anshinsoft.repro.JackrabbitDeployer.contextInitialized(
> JackrabbitDeployer.java:242)
>
> Here is my .cnd file....
>
> [repro:base] > nt:hierarchyNode
>
> [repro:template] > repro:base
>         orderable
>         + content (repro:templateContent)
>         + reports (repro:reports)
>
> [repro:templateContent] > repro:base
>         orderable mixin
>         + meta (repro:templateMeta)
>         - data (BINARY) mandatory protected
>
> [repro:templateMeta] > repro:base
>         orderable
>         - description (STRING)
>         - roles (STRING) multiple
>         - scheduled (STRING)
>         - status (STRING)
>         - namingRule (STRING)
>         - uploadedBy (STRING)
>         - uploadTime (DATE)
>
> [repro:reports] > repro:base
>         orderable
>         + pdf (repro:reportGroup)
>         + rtf (repro:reportGroup)
>         + txt (repro:reportGroup)
>         + html (repro:reportGroup)
>         + odoc (repro:reportGroup)
>         + oxls (repro:reportGroup)
>
> [repro:reportGroup] > repro:base
>         orderable
>         + * (repro:report)
>
> [repro:report] > repro:base
>         orderable
>         + params (repro:reportParams)
>         + deliveryLogs (repro:reportDeliveryLogs)
>         + meta (repro:reportMeta)
>         - data (BINARY) mandatory protected
>
> [repro:reportMeta] > repro:base
>         orderable
>         - templateName (STRING)
>         - templateVersion (STRING)
>         - roles (STRING) multiple
>         - generatedBy (STRING)
>         - generationTime (DATE)
>         - generationType (STRING)
>
> [repro:reportParams] > repro:base
>         + * (repro:reportParam)
>
> [repro:reportParam] > repro:base
>         orderable
>         - type (STRING)
>         - value (UNDEFINED)
>
> [repro:reportDeliveryLogs] > repro:base
>         orderable
>         + * (repro:reportDeliveryLog)
>
> [repro:reportDeliveryLog] > repro:base
>         orderable
>         - mode (STRING)
>         - address (STRING)
>         - status (STRING)
>
> My code goes like this...
>
>                         InputStream in = Thread.currentThread
> ().getContextClassLoader()
>                                         .getResourceAsStream(
> reproNodeType.cnd);
>                         Reader reader = new InputStreamReader(in);
>                         CompactNodeTypeDefReader cndReader = new
> CompactNodeTypeDefReader(
>                                         reader, reproNodeType.cnd);
>
> I have programmatically registered the namespace 'repro' before this code
> fragment.
>
> The interesting part is that when I register the nodetypes through
> JackrabbitNodetypeManager I dont get the exception. For e.g.
>
> NodeTypeManagerImpl manager = (NodeTypeManagerImpl) ws.getNodeTypeManager
> ();
> manager.registerNodeTypes(in, NodeTypeManagerImpl.TEXT_X_JCR_CND);
>
> Can anybody tell me what am I missing.
>
> Thanks in advance.
>
> ~ Kalyan Sarkar
> --
> View this message in context:
> http://www.nabble.com/Parse-Exception-while-registering-node-types-tf3679606.html#a10282980
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message