jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: XMLPersistenceManager problem and Happy new year :)
Date Fri, 31 Dec 2004 13:01:55 GMT
hi edgar

On Fri, 31 Dec 2004 01:34:29 -0300, Edgar Poce <edgarpoce@gmail.com> wrote:
> Hi
>   I'm a new user of jackrabbit. After running a few test cases which
> produced abnormal terminations caused by misuse of the API the
> repository got broken. 

what exactly did you do? is it reproducable?

> I mean broken because the dump example from
> http://incubator.apache.org/jackrabbit/firststeps.html started to throw
> ItemNotFoundException. At some point the root node remained pointing to
> a child already deleted.

with the current code it shouldn't be possible to get into this state 
(unless you kill the jvm process). i'm curious therefore how you managed
to break the repository.

> I dived into the code and found that XMLPersistenceManager adds child
> node entries without checking the existence of the node.xml file (line
> 233). I think it should add only checked nodes and log an error message
> when an inconsistency is found.

a redesign of the PersistenceManager interface (amongst others) is currently
in the works.  the new design will make it easier to implement
backed by transactional stores.

> One more thing, it took me a time to realize how to register custom
> namespaces and nodetypes. Maybe a hint in firststeps.html would help. I
> added a line in ns_reg.properties and created a file called
> custom_nodetypes.xml in /repository/nodetypes. Is it the right way?

no! registering namespaces is covered by the JCR api. see
registering custom node types is not covered by the JSR170 spec
and is therefore implementation specific. see 

BTW, you could have tried a little harder. a quick look in the code
would have been sufficient to find the desired information. names 
like NamespaceRegistry and NodeTypeRegistry are IMO pretty 


> Best regards
> Edgar

View raw message