alfresco-bulk-import
alfresco-bulk-import copied to clipboard
cannot import into an RM site
When I try to import into an RM site I get access denied exception.
2015-07-17 15:25:51,448 INFO [org.alfresco.extension.bulkimport.impl.Scanner] [BulkImport-Scanner] BULKIMPORT: Import (streaming) started from Default.
2015-07-17 15:25:51,550 DEBUG [org.alfresco.extension.bulkimport.impl.BatchImporterImpl] [BulkImport-Scanner] BULKIMPORT: Importing Batch #1, 1 items, 0 bytes.
2015-07-17 15:25:51,566 DEBUG [org.alfresco.extension.bulkimport.impl.BatchImporterImpl] [BulkImport-Scanner] BULKIMPORT: Finding parent folder ''.
2015-07-17 15:25:51,806 ERROR [org.alfresco.extension.bulkimport.impl.Scanner] [BulkImport-Scanner] BULKIMPORT: Bulk import from 'Default' failed.
org.alfresco.extension.bulkimport.impl.ItemImportException: Unexpected exception:
class org.alfresco.repo.security.permissions.AccessDeniedException: 06170051 Access Denied. You do not have the appropriate permissions to perform this operation.
While importing item: Military Assignment Documents (1 version):
HEAD:
Brian
A couple of questions to try and gather some more information on this problem ..
- What version of RM are you using?
- What type of RM artifact are you trying to import "Military Assignment Documents" into? File Plan root? Record category? Record folder?
- What type of RM artifact is "Military Assignment Documents"? Record category? Record folder?
- Are you specifying the type of "Military Assignment Documents" in the import meta-data information?
Hi Guys,
Thanks for looking at this. I did an export of the military assignment folder from the sample site using the Alfresco-bulk export tool (version 5.1) and then tried to import it (to a fresh blank version) using the bulk import tool. So it is being imported the root documentLibrary folder of the rm site. It just fails. (Note I have confirmed I can do the same thing if importing from a standard site to a standard site.
Since raising the issue but, I have noted that one of the fields in my export is the record identifier (which is system set). I took it out and it still fails with the latest bulk importer.
Also I tried using the built in alfresco bulk importer (ie old version of hte importer) and it works as long as I take the identifier out. I will be working on this progressively today.
One question I have that would really help with what I am doing. I have the export tool downloaded and intend to customise it to ensure I can map metadata values correctly to the shadow metadata files. However, I potentially need to hook into the import for a node as well to clean up any of the imported values for the node. Probably best to do this before the node commits so I was thinking of hooking into the beforeCreate policy. So simply my question is, is this a valid approach? If not, can you recommend another approach.
Regards and thanks for any help.
Brian
Brian
On Mon, Jul 20, 2015 at 9:27 AM, Roy Wetherall [email protected] wrote:
A couple of questions to try and gather some more information on this problem ..
- What version of RM are you using?
- What type of RM artifact are you trying to import "Military Assignment Documents" into? File Plan root? Record category? Record folder?
- What type of RM artifact is "Military Assignment Documents"? Record category? Record folder?
- Are you specifying the type of "Military Assignment Documents" in the import meta-data information?
— Reply to this email directly or view it on GitHub https://github.com/pmonks/alfresco-bulk-import/issues/39#issuecomment-122717486 .[image: Web Bug from https://github.com/notifications/beacon/AD65WK4NQVTG1KB5sCaoY3wl6YKcUPwOks5ofCn3gaJpZM4Fac3a.gif]
Brian O'Neill | Principal Seed Information Management Mobile: 0401166254 Email: [email protected] Factory 59, The Docklands Cotton Mills, Victoria 3011
@boneill would you mind answering Roy's questions? That will help nail down what's happening.
FWIW I just noticed that the stack trace above is incomplete (the code was losing important exception information), so I've just fixed that (in rev 1e5ee077f982248ee84d87a70add87b79c0de746). I'll try to cut a new RC later this week, and if you're able to reproduce the issue and post the improved stack trace we may have a better chance of identifying the root cause.
Hi Roy,
Answers below:
- What version of RM are you using? (BON) Version 2.3
- What type of RM artifact are you trying to import "Military Assignment Documents" into? File Plan root? Record category? Record folder? (BON) File Plan Root.
- What type of RM artifact is "Military Assignment Documents"? Record category? Record folder? (BON) Record Category.
- Are you specifying the type of "Military Assignment Documents" in the import meta-data information? (BON) Yes.
Regards
Brian
On Mon, Jul 20, 2015 at 9:27 AM, Roy Wetherall [email protected] wrote:
A couple of questions to try and gather some more information on this problem ..
- What version of RM are you using?
- What type of RM artifact are you trying to import "Military Assignment Documents" into? File Plan root? Record category? Record folder?
- What type of RM artifact is "Military Assignment Documents"? Record category? Record folder?
- Are you specifying the type of "Military Assignment Documents" in the import meta-data information?
— Reply to this email directly or view it on GitHub https://github.com/pmonks/alfresco-bulk-import/issues/39#issuecomment-122717486 .[image: Web Bug from https://github.com/notifications/beacon/AD65WK4NQVTG1KB5sCaoY3wl6YKcUPwOks5ofCn3gaJpZM4Fac3a.gif]
Brian O'Neill | Principal Seed Information Management Mobile: 0401166254 Email: [email protected] Factory 59, The Docklands Cotton Mills, Victoria 3011
I just pushed RC2 - if you could give that a whirl and paste in the full exception stack we might get a bit more information about what's going on.
@roywetherall any insights based on the information @boneill provided above?
Hi Guys,
I will do my best to testing this again towards the end of this week. I reverted to using the older version which I can get to work and project pressures meant I needed to keep going. But I will cycle back around to this and retest with the new release and let you know. Thanks for your responsiveness.
Brian
On Tue, Aug 4, 2015 at 4:56 AM, Peter Monks [email protected] wrote:
@roywetherall https://github.com/roywetherall any insights based on the information @boneill https://github.com/boneill provided above?
— Reply to this email directly or view it on GitHub https://github.com/pmonks/alfresco-bulk-import/issues/39#issuecomment-127369877 .[image: Web Bug from https://github.com/notifications/beacon/AD65WLEQ0lnbfmTsZid38d4WHjVmoo8cks5oj7DUgaJpZM4Fac3a.gif]
Brian O'Neill | Principal Seed Information Management Mobile: 0401166254 Email: [email protected] Factory 59, The Docklands Cotton Mills, Victoria 3011
Any updates? I'd like to dig a bit deeper into this before pushing the v2.0 GA, but don't have access to an RM environment to test against.
Hi pmonks,
I was trying to import files to RM and ran into this issue. After looking into your code I found that setting type is causing the problem.
To be exact, line 511 in BatchImporterImpl.java
nodeService.setType(nodeRef, createQName(serviceRegistry, type));
RM doesn't allow type change so we get AccessDeniedException.
Is there any specific reason why you are setting the type again after createNode? Maybe update scenario?
@taradic the setType
call is required for imports where replacement is enabled. The precise scenario is where an existing node (i.e. one that was not created by the tool) needs to be updated to match whatever is on disk (including type).
That said, for the creation case the call is redundant, and given RM's apparent intolerance of setType
, shouldn't be made.