macressler / alfresco-bulk-filesystem-import

Automatically exported from code.google.com/p/alfresco-bulk-filesystem-import
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Invalid node ref #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to the import UI page, such as 
http://localhost:8080/alfresco/service/bulk/import/filesystem
2. Enter the import directory, such as /home/alfresco/import, where the 
attached pdf and metadata files reside
3. Enter the target space, such as /Company 
Home/Sites/test/documentLibrary/import
4. Initiate Bulk Import

What is the expected output? What do you see instead?
The file should be imported with tags, "learjet60" and "factsheet". An 
exception was thrown instead.

What version of the product are you using? On what operating system?
Bulk Import 1.0, Alfresco Enterprise 3.4.1 on Ubuntu

Please provide any additional information below.
See exception-stack.txt

Is there anything wrong with the metadata property file? There are some other 
files without cm:taggable aspect and they were imported successfully.

Original issue reported on code.google.com by zhihai....@gmail.com on 27 Sep 2011 at 8:55

Attachments:

GoogleCodeExporter commented 9 years ago
The cm:taggable property is of type d:category, which basically means that it's 
a d:noderef (the underlying implementation classes for these two data types are 
one and the same).  In other words, tags aren't stored directly in content, 
instead they're managed as an independent set of nodes in the repository 
(category nodes, as it turns out), and each content item stores one or more 
pointers (NodeRefs) to the tag(s) it is associated with.

So to populate the tags of a content node, you need to know the NodeRefs of 
each of the tags you wish to associate it to, and use those NodeRefs in the 
shadow metadata file, rather than the display names of those tags.

The example file you've attached 
(learjet_60_xr_factsheet.pdf_FS.pdf.metadata.properties.xml) appears to instead 
be using the display name of the tag instead (i.e. "learjet60"), which won't 
work because that value isn't a NodeRef (NodeRefs have the form 
[storeType]://[storeId]/[contentGuid] - e.g. 
"workspace://SpacesStore/f6184f65-7631-4ea4-b9a7-07cd73a988d6").

So to get this to work, you'll need to find out the NodeRef of the tag with the 
visible name "learjet60" (this can be done using the node browser tool in the 
admin console), and put that value into your metadata file.

Issue #57 does indeed describe this process in more detail, and I've added a 
pointer to it (as well as this issue) to the Troubleshooting wiki page 
(http://code.google.com/p/alfresco-bulk-filesystem-import/wiki/Troubleshooting).
  The troubleshooting page is still a work in progress, but as I find time I 
intend to expand it to better explain both the symptoms of these issues and the 
solutions.  Your help / contributions in improving the documentation would be 
welcome!

Original comment by pmo...@gmail.com on 29 Sep 2011 at 6:51