Importing error
Ajouté par riccardo bernardi il y a environ 7 ans
Good morning,
I am having a problem in importing suppliers in raw materials.
First I have created a new supplier with the bcpg:code "S2". Then I populated the csv file by adding "S2" (I also tried "2" only) in the bcpg:suppliers field.
I got this message.
Starting date: Fri Feb 03 12:12:08 CET 2017 Error: org.alfresco.error.AlfrescoRuntimeException: 01038035 Exception in Transaction. at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:543) at fr.becpg.repo.importer.impl.ImportServiceImpl.importText(ImportServiceImpl.java:228) at fr.becpg.repo.action.executer.ImporterActionExecuter$FileImporter.lambda$run$39(ImporterActionExecuter.java:168) at fr.becpg.repo.action.executer.ImporterActionExecuter$FileImporter$$Lambda$83/386497750.doWork(Unknown Source) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548) at fr.becpg.repo.action.executer.ImporterActionExecuter$FileImporter.run(ImporterActionExecuter.java:214) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: fr.becpg.repo.importer.ImporterException: Target assoc not found. type:Supplier - value:S2 at fr.becpg.repo.importer.impl.AbstractImportVisitor.findTargetNodeByValue(AbstractImportVisitor.java:1357) at fr.becpg.repo.importer.impl.AbstractImportVisitor.findTargetNodesByValue(AbstractImportVisitor.java:1204) at fr.becpg.repo.importer.impl.AbstractImportVisitor.importAssociations(AbstractImportVisitor.java:452) at fr.becpg.repo.importer.impl.AbstractImportVisitor.importNode(AbstractImportVisitor.java:263) at fr.becpg.repo.importer.impl.ImportEntityListAspectVisitor.importNode(ImportEntityListAspectVisitor.java:55) at fr.becpg.repo.importer.impl.ImportServiceImpl.importInBatch(ImportServiceImpl.java:476) at fr.becpg.repo.importer.impl.ImportServiceImpl.lambda$importText$50(ImportServiceImpl.java:228) at fr.becpg.repo.importer.impl.ImportServiceImpl$$Lambda$85/137193012.execute(Unknown Source) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457) ... 8 more Ending date: Fri Feb 03 12:12:08 CET 2017
What am I doing wrong?
Thanks in advance for your help!
Réponses (5)
RE: Importing error - Ajouté par Philippe Quéré il y a environ 7 ans
Hello,
bcpg:code is generated automatically.
You should use the field bcpg:erpCode if you want to store a code filled manually.
Best regards,
RE: Importing error - Ajouté par riccardo bernardi il y a environ 7 ans
Hello,
thank you for your answer.
It works!
RE: Importing error - Ajouté par riccardo bernardi il y a environ 7 ans
Do you know if it is possible to empty the data list before doing the import procedure?
I import ingredients to a raw material like this:
ING A 50%
ING B 50%
But for some reasons the raw materials has changed and now it is made with only ING A (100%).
I know that is possible to set ING A 100% and ING B 0%, but I would like to remove B completely.
Is it possible to delete the ingredient B during the import step?
Thanks!
RE: Importing error - Ajouté par Matthieu Laborie il y a environ 7 ans
Hi,
You can use:
DELETE_DATALIST;true
In your import header
Regards
RE: Importing error - Ajouté par riccardo bernardi il y a environ 7 ans
Very nice :-)!!
It works perfectly!
Is it possible to do the same with the Characteristics List? Like ingredients, allergens, nutrients, costs, etc.
Thanks again!
Regards