jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (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 Tue, 19 Jun 2012 10:10:44 GMT

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

angela commented on JCR-3279:
-----------------------------

so: fixing a issue is ImportUUIDBehavior would not address your problem that users and acl
exported from jackrabbit-core cannot be imported with jcr2spi.
                
> 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