jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Jentzsch <simonjentz...@yahoo.de>
Subject Bugfix for SessionImporter mit uuidBehavior =IMPORT_UUID_COLLISION_REPLACE_EXISTING
Date Thu, 08 May 2008 11:20:07 GMT
Hi,

After trying to import a SystemView and replacing the existing nodes 
(IMPORT_UUID_COLLISION_REPLACE_EXISTING), i got a Exception:

Caused by: javax.jcr.ItemExistsException: /core_admin_jcr/website
        at 
org.apache.jackrabbit.core.xml.SessionImporter.startNode(SessionImporter.java:204)
        at 
org.apache.jackrabbit.core.xml.SysViewImportHandler.processNode(SysViewImportHandler.java:86)
        at 
org.apache.jackrabbit.core.xml.SysViewImportHandler.startElement(SysViewImportHandler.java:127)
        at 
org.apache.jackrabbit.core.xml.ImportHandler.startElement(ImportHandler.java:192)
....

I looked at the source and found a strange line in SessionImporter (Line 
202):

                    if (! (existing.getId().equals(id)
                            && (uuidBehavior == 
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
                            || uuidBehavior == 
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)))

It does not make sense to check the same condition twice, so I believe 
the 2nd Check should be

|| uuidBehavior == 
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING.


I'm using jackrabbit-core-1.4.1, but after reading the release-notes, it 
does not seem to be fixed in 1.4.2.
I hope this will help fix the bug (if it is one).

by

simon



		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


Mime
View raw message