jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Thompson" <elephant...@gmail.com>
Subject Re: Jackrabbit Custom Nodes
Date Tue, 18 Dec 2007 16:04:31 GMT
I had this issue last time I was using Jackrabbit in a project.  As a
workaround, I specified the base namespaces in the CND:

## CND
<nt = 'http://www.jcp.org/jcr/nt/1.0'>

<webfmis="http://www.mysite.com">
[webfmis:doc] > nt:resource
- webfmis:fileName (string)
- webfmis:size (string)


-Brian



On Dec 18, 2007 9:55 AM, Sean Callan <seancallan@gmail.com> wrote:

> Hi,
>
> I made some modification to my CND as instructed:
>
> ## CND
> <webfmis="http://www.mysite.com">
> [webfmis:doc] > nt:resource
> - webfmis:fileName (string)
> - webfmis:size (string)
>
> However, now this error is generated
> "(java.lang.String) Error while parsing 'nt:resource' (cnd input
> stream, line 2)"
>
> Could there be an issue with the line return characters?  I'm
> currently on Windows I wasn't sure if perhaps the issue was with the
> \n\r.
>
>
> On Dec 18, 2007 10:04 AM, Tobias Bocanegra <tobias.bocanegra@day.com>
> wrote:
> > you probably forgot the register your namespace:
> >
> > <webfmis=http://your.company.org>
> > [webfmis:resource] > nt:resource
> > - webfmis:fileName (string)
> > - webfmis:size (string)
> >
> > regards, toby
> >
> >
> >
> > On 12/18/07, Sean Callan <seancallan@gmail.com> wrote:
> > > I'm having some trouble creating my own custom nodes and I've done a
> > > fair amount of searching online but I'm still ending up with errors.
> > >
> > > This is the exception that is being generated, it's very cyptic and
> > > not very informative : "(java.lang.String) Error while parsing
> > > 'webfmis:resource' (cnd input stream, line 1)"
> > >
> > > I have the following code:
> > >
> > > ## CND File
> > > [webfmis:resource] > nt:resource
> > > - webfmis:fileName (string)
> > > - webfmis:size (string)
> > >
> > > ## Java Loading
> > > JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
> > > ticket.getWorkspace().getNodeTypeManager();
> > > manager.registerNodeTypes(new
> > > FileInputStream(Properties.getWebInfPath() +
> > > "/repositoryNodeTypes.cnd"),
> > > JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> > >
> > > Thanks guys!
> > >
> >
> >
> > --
> > -----------------------------------------< 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message