AnsweredAssumed Answered

Importing node with custom association fails

Question asked by gostaj on Feb 21, 2014
Latest reply on Mar 19, 2014 by abarisone

I have created a custom node type with a custom association:

        <type name="peas:imageHolder">

                <association name="peas:currentThumbnailFolder">

I have created an association from a node of this type to a folder beneath it like this:
       nodeService.createAssociation(sourceRef, targetRef, QName.createQName("", "currentThumbnailFolder"));

Earlier I have declared: 
<import uri="" prefix="peas"/>

The association works and looks fine in the Node Browser.

Then I export a "peas:imageHolder" node with a "currentThumbnailFolder" association to one of it's children.

<strong>Here is my problem: When i try to import the node (at another place in the content tree on the same Alfresco instance) I get this error:</strong>

Failed to execute import: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 955; column 3466 due to error: Cannot find node referenced by path peas:childAssocication[5]

In the XML-file in the ACP-file I find this at the bottom:

        <view:reference view:pathref="peas:childAssocication[5]/WorkingCopy[29]"></view:reference>

The "currentThumbnailFolder" association is pointing to a folder called "WorkingCopy" so that is correct but Alfresco doesn't seem to be able to import the exported data. This seems like a bug to me but perhaps I'm doing something wrong?
Please help! Thanks!