jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3279) ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING and ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING not working over davex
Date Sat, 16 Jun 2012 06:12:42 GMT

    [ https://issues.apache.org/jira/browse/JCR-3279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13296116#comment-13296116
] 

Tobias Bocanegra commented on JCR-3279:
---------------------------------------

I think the problem is, that spi2dav does not transport the sysview import as-is to jackrabbit
but internally imports it and then just sends the changes as it would be normal updates. so
the special importer in jackrabbit that would handle uuid collision or protected item behaviors
are not used.
                
> ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING and ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
not working over davex
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-3279
>                 URL: https://issues.apache.org/jira/browse/JCR-3279
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-spi2dav
>    Affects Versions: 2.4
>            Reporter: David Buchmann
>
> i have a repository with a node like this:
> <sv:node sv:name="idExample">
>         <sv:property sv:name="jcr:primaryType" sv:type="Name">
>             <sv:value>nt:unstructured</sv:value>
>         </sv:property>
>         <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
>             <sv:value>mix:referenceable</sv:value>
>         </sv:property>
>         <sv:property sv:name="jcr:uuid" sv:type="String">
>             <sv:value>842e61c0-09ab-42a9-87c0-308ccc90e6f4</sv:value>
>         </sv:property>
> </sv:node>
> when i try to import that node a second time at a different location, i only get things
to work with ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW. the COLLISION_THROW throws an exception
as expected. but when telling to replace or remove the existing node, i get
> Exception in thread "main" javax.jcr.RepositoryException: javax.jcr.ItemExistsException:
a node with uuid 842e61c0-09ab-42a9-87c0-308ccc90e6f4 already exists!
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:69)
>         at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:51)
>         at org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.start(RepositoryServiceImpl.java:611)
>         at org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.access$600(RepositoryServiceImpl.java:547)
>         at org.apache.jackrabbit.spi2davex.RepositoryServiceImpl.submit(RepositoryServiceImpl.java:452)
>         at org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.execute(WorkspaceManager.java:858)
>         at org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.access$500(WorkspaceManager.java:817)
>         at org.apache.jackrabbit.jcr2spi.WorkspaceManager.execute(WorkspaceManager.java:620)
>         at org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.save(SessionItemStateManager.java:139)
>         at org.apache.jackrabbit.jcr2spi.ItemImpl.save(ItemImpl.java:250)
>         at org.apache.jackrabbit.jcr2spi.SessionImpl.save(SessionImpl.java:333)
>         at Client.main(Client.java:31)
> my code is dead simple. init jackrabbit over davex, then
> session.importXML("/path", new FileInputStream("base.xml"), ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
> jackrabbit actually tries to send something over the wire:
> -/idExample : 
> +/idExample : {"jcr:primaryType":"nt:file","jcr:uuid":"842e61c0-09ab-42a9-87c0-308ccc90e6f4"}
> ^/idExample/jcr:mixinTypes : []
> +/idExample/jcr:content : {"jcr:primaryType":"nt:unstructured"}
> i wonder if the jsop implementation on server side is broken or if i misunderstand something.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message