cancel
Showing results for 
Search instead for 
Did you mean: 

ACP Import not recognizing valid XML metadata file

chrispott
Champ in-the-making
Champ in-the-making

Hello all,

I'm in the beginning stages of trying to create ACP archives to import documents exported from another system.

My first step was to simply go through the mechanics of importing an ACP file.

I first exported a simple ACP file from Alfresco, decompressed it, then recompressed it as a ZIP, changed the filename extension and tried to re-import it.

I have not altered the contents of the original archive at all except to decompress/recompress it, yet when I attempt to import it, I receive the error message:

"Failed to execute import: org.alfresco.service.cmr.view.ImporterException: Failed to find xml meta-data file within .acp package"

The XML file is most definitely there… what could be happening to cause Alfresco to not be able to see it?

If I re-upload the original ACP file without decompressing/recompressing it first, it imports without issue.  What could the UNZIP/ZIP process be doing to render it unreadable?

Thanks in advance for any ideas or assistance.

(Alfresco Enterprise - v4.1.1 (.3 61))
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
First why do yo need to do this zipping and unzipping
You should not do anything with the exported ACP file.
You can directly import the ACP file exported from one instance to another.
Provided version of Alfresco on both the system is same.

ACP is nothing but zipping format for alfresco related files.
When you are extracting that file you are loosing the structure created.
You can simply rezip it to get the actual ACP structure.

Thanks for the reply.  Ultimately I will be exporting documents from a non-Alfresco system, and creating my own ACP files for import.  My first step was just to work through the mechanics of exporting/importing.  I will need to zip up my assets and a metadata file, rename it ACP for import, then import it.  If I can't make this work with what I know is a valid ACP metadata file, how will I be able to do it with a self-constructed one?

There must be something in the ZIP process that's rendering the file un-importable… just trying to figure out what that is.

Thanks,

Chris

Hi Chris,
I would suggest, please export a space / document from alfresco explorer as ACP file. Rename the ACP to zip and extract it. Now look at the contents. It will have one xml file and a folder contains your document.
Now look at the xml structure and you need to create a similar kind of xml file with the file contents.

Hope this helps you !

mdutoo
Champ on-the-rise
Champ on-the-rise
Hi

There are various tools out there to help you generate ACP XML, from XML XSL transformations to the Alfresco ETL Connector for Talend's client Java library :

https://github.com/OpenWide-SI/alfresco-etl-connector/blob/master/etlconnector-client/src/fr/openwid...

To see how to use it, see unit tests.

Regards