jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu" <the.mindstorm.mailingl...@gmail.com>
Subject Re: javax.jcr.nodetype.ConstraintViolationException
Date Fri, 21 Apr 2006 18:00:36 GMT
Thanks Jukka. Indeed, I thought the supertype is always needed. I will
have to clean my node defs because of this. Now the solution to the

I had some content in the repository. Because of this some type
definitions where already persisted and they lead to the content of
the cache. When using the new definition, it has an intersection with
an old one, and that's the reason the exception is thrown.

This leads me to a more philosophical question:

let's say we have an working repository with data. After a while, we
identify that we need to enhance the date with some more properties
(add a feature to the content). We decide to do this by adding a new
mixin to the existing content nodes (because we are talking about a
crosscutting feature, and because there is no other way). Is this
scenario gonna work? Is this the correct approach? If not, how can we
do it?

In the beginning, when I first met mixins in JCR, I thought of them
like the programming mixin model (something we miss in Java core, but
some other languages have it, and in Java it is supported through AOP
ITD). And I was thinking that this is really cool, cause I can enhance
the model live. Now, when trying to play with this idea, I am getting
the feeling that this is not possible, and the content model is quite
static. Am I wrong?

.w( the_mindstorm )p.

On 4/21/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
> On 4/21/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> > Unfortunately, I am completely unable to understand what is wrong. Can
> > you please shed some light on it?
> A wild shot: Try removing the supertype declaration in your mixin node
> type. It doesn't make sense to have nt:base as the supertype of a
> mixin type.
> The error message doesn't really point to this, but I suppose the
> mixin supertype might be an issue that is throwing the node type
> manager off balance.
> BR,
> Jukka Zitting
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftsmanship, JCR consulting, and Java development

View raw message