10-25-2018 03:02 AM
Hi everyone,
I have a problem using bulkimport
I'd like to import documents and change their types and custom properties
I have two files :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="type">myCM:RH</entry>
<entry key="myCM:serviceRH">FrontOffice</entry>
<entry key="myCM:identificationPortefeuilleRH">4</entry>
</properties>
I use bulkimport with curl :
curl -v -u admin:admin -L POST --url "localhost:8080/alfresco/s/bulkfsimport/initiate" --data "targetPath=/Sites/human-resources/documentLibrary/&sourceDirectory=/app/tmp/test&existingFileMode=REPLACE"
Here is my problem : BOTH files are posted in the document Library of my human-resources site.
In the document library I have test.pdf and test.pdf.metadata.xml
More over, the type and custom properties of my test.pdf file aren't modify.
Au niveau du fichier log4j je n'ai pas d'erreur :
2018-10-25 10:36:46,750 DEBUG [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk import started from '/app/tmp/test'...
2018-10-25 10:36:46,752 INFO [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: Commencing batch of 100 entries
2018-10-25 10:36:46,753 DEBUG [bulkimport.impl.DirectoryAnalyserImpl] [BulkFilesystemImport-BackgroundThread] Analysing directory /app/tmp/test...
2018-10-25 10:36:46,754 DEBUG [bulkimport.impl.DirectoryAnalyserImpl] [BulkFilesystemImport-BackgroundThread] Finished analysing directory /app/tmp/test.
2018-10-25 10:36:46,758 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] RETRY TXNS: []
2018-10-25 10:36:46,758 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Bulk Filesystem Import1 ready to execute
2018-10-25 10:36:46,759 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Importing org.alfresco.repo.bulkimport.ImportableItem@4ded1775[HeadRevision=org.alfresco.repo.bulkimport.ImportableItem$ContentAndMetadata@20d17725[contentFile=/app/tmp/test/test.pdf,metadatafile=<null>],Versions=<null>]
2018-10-25 10:36:46,759 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Searching for node with name 'test.pdf' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,760 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Creating new node of type '{http://www.alfresco.org/model/content/1.0}content' with name 'test.pdf' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,772 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Streaming contents of file '/app/tmp/test/test.pdf' into node 'workspace://SpacesStore/0fdf9519-e5c2-47bb-9f27-21c6dd5bd2f9'.
2018-10-25 10:36:46,807 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Adding properties to node 'workspace://SpacesStore/0fdf9519-e5c2-47bb-9f27-21c6dd5bd2f9':
[{http://www.alfresco.org/model/content/1.0}name = test.pdf,
{http://www.alfresco.org/model/content/1.0}created = Wed Jul 27 08:52:06 RET 2016,
{http://www.alfresco.org/model/content/1.0}title = test.pdf,
{http://www.alfresco.org/model/content/1.0}modified = Wed Jul 27 08:52:06 RET 2016]
2018-10-25 10:36:46,816 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Importing org.alfresco.repo.bulkimport.ImportableItem@127def54[HeadRevision=org.alfresco.repo.bulkimport.ImportableItem$ContentAndMetadata@6d29748b[contentFile=/app/tmp/test/test.pdf.metadata.xml,metadatafile=<null>],Versions=<null>]
2018-10-25 10:36:46,817 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Searching for node with name 'test.pdf.metadata.xml' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,818 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Creating new node of type '{http://www.alfresco.org/model/content/1.0}content' with name 'test.pdf.metadata.xml' within node 'workspace://SpacesStore/e02f9fab-b8dc-47e8-82a0-42004687970b'.
2018-10-25 10:36:46,828 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Streaming contents of file '/app/tmp/test/test.pdf.metadata.xml' into node 'workspace://SpacesStore/4113de28-833f-4bae-8231-80027935cb02'.
2018-10-25 10:36:46,849 DEBUG [repo.bulkimport.BulkFilesystemImporter] [Bulk Filesystem Import1] Adding properties to node 'workspace://SpacesStore/4113de28-833f-4bae-8231-80027935cb02':
[{http://www.alfresco.org/model/content/1.0}name = test.pdf.metadata.xml,
{http://www.alfresco.org/model/content/1.0}created = Tue Sep 18 15:38:50 RET 2018,
{http://www.alfresco.org/model/content/1.0}title = test.pdf.metadata.xml,
{http://www.alfresco.org/model/content/1.0}modified = Tue Sep 18 15:38:50 RET 2018]
2018-10-25 10:36:46,895 INFO [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: Processed 2 entries. Rate: 13 per second. 0 failures detected.
2018-10-25 10:36:46,899 INFO [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: Completed batch of 100 entries
2018-10-25 10:36:46,899 DEBUG [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk import from '/app/tmp/test' succeeded.
Thanks in advance
I'm on centos 7 and alfresco community 5.2
10-25-2018 07:10 AM
Problem solved : the name of the xml file should be test.pdf.metadata.properties.xml
Explore our Alfresco products with the links below. Use labels to filter content by product module.