jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Bobby <dvbob...@yahoo.com>
Subject Re: Adding node of custom type
Date Sun, 06 Aug 2006 14:22:17 GMT
Hi all,

I am new to jackrabbit and trying to understand what
node types are and how to create new ones. 

> I have a custom type, defined as:
> 
> [myapp] > nt:base, mix:referenceable,
> mix:versionable
> - size (long) mandatory
> - rules mandatory
> - locale mandatory
> - address mandatory

What does the above declaration mean. 
Is this grammar documented somewhere. 
>From what I read above, the node type is "myapp" and
it extends nt:base. What is the primary node type
here? 
Is there an example somewhere of adding such
nodetypes?

Thanks for your help.

Dave.
--- JavaJ <ponfar99@yahoo.com> wrote:

> 
> I can't seem to get this to work even though it
> should probably really
> simple.
> 
> I have a custom type, defined as:
> 
> [myapp] > nt:base, mix:referenceable,
> mix:versionable
> - size (long) mandatory
> - rules mandatory
> - locale mandatory
> - address mandatory
> 
> The type gets loaded on startup and I verified that
> it's loaded by using the
> NodeTypeRegistry and printing out all the registered
> types.
> 
> But when I try to add a new node of this type, I get
> this error when I try
> to call Node.setProperty("rules", "some value");
> 
> javax.jcr.nodetype.ConstraintViolationException: no
> matching property
> definition found for {}rules
> 
> Does it have something to do with not specifying a
> namespace for that
> property?
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Adding-node-of-custom-type-tf2052416.html#a5654413
> Sent from the Jackrabbit - Users forum at
> Nabble.com.
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message