I was unable to import using the BulkImport tool for a file that has an ampersand in the file name or in the meta-data.
Steps to reproduce:
1. Create folder for customer files i.e. ampersand.
2. Download 2.2 INFORME LARGO.pdf.metadata.properties.xml and 2.2 INFORME LARGO.pdf from case 00165066 attachments and store customer files in folder ampersand.
3. Log into Alfresco Share 4.2.0 as sysadmin.
4. Follow the general instructions for streaming import here: http://docs.alfresco.com/4.2/concepts/bulk-import-via-the-ui.html
A. Go to URL http://127.0.0.1:8080/alfresco/service/bulkfsimport
B. For import directory specify ampersand folder i.e. /home/alfresco/Desktop/ampersand
C. For Target Space Path: choose repository folder i.e. /Company Home/Case00165066
D. Press Initiate Bulk Import Button
Files should be imported successfully.
File did not import successfully and there was an error message:
2014-07-21 11:57:19,354 WARN [bulkimport.metadataloaders.XmlPropertiesFileMetadataLoader] [Bulk Filesystem Import1] Metadata file '/home/alfresco/Desktop/ampersand/2.2 INFORME LARGO.pdf.metadata.properties.xml' could not be read.
java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 31; The entity name must immediately follow the '&' in the entity reference.
2014-07-21 11:57:19,358 WARN [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Bulk Filesystem Import: Failed to process entry "org.alfresco.repo.bulkimport.ImportableItem@7f361a04[HeadRevision=org.alfresco.repo.bulkimport.ImportableItem$ContentAndMetadata@38e63ddb[contentFile=<null>,metadatafile=/home/alfresco/Desktop/ampersand/2.2 INFORME LARGO.pdf.metadata.properties.xml],Versions=<null>]".
I tried this with both streaming and in-place imports. I tried to escape the ampersand and got the same results. I also tried moving the names directly adjacent to the & character and saw the same results. Also found this error in both 4.2.0 and 4.2.2.
"We are from a spanish foreign language and we use this symbol in several types as company names.
So, as we are uploading a lot of documents with bulkfsimport service, the impact is to change lot of documents.
We need to work with this symbol."
Customer would like to see a fix in 4.2.2 if possible so he can upgrade and get the fix at the same time.