cancel
Showing results for 
Search instead for 
Did you mean: 

error importing acp file

itayh
Champ in-the-making
Champ in-the-making
Hi,

I have spaces with associations that I add to them.
I perfor the next steps:

1 - Export the space to root directory
2 - Save it to my computer
3 - delete the folder and acp file from alfresco.
Import the acp file to alfresco.

I get the next error:
14:37:47,124 ERROR [org.alfresco.web.ui.common.Utils] Failed to execute import: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 224; column 25 due to error: Association {custom.model}Thumbnail is not valid for node {http://www.alfresco.org/model/content/1.0}folder
org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 224; column 25 due to error: Association {custom.model}Thumbnail is not valid for node {http://www.alfresco.org/model/content/1.0}folder
   at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:189)
   at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:360)
   at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:235)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:238)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy52.importView(Unknown Source)
   at org.alfresco.repo.action.executer.ImporterActionExecuter.executeImpl(ImporterActionExecuter.java:185)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:120)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:537)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:472)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:399)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:387)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:545)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy19.executeAction(Unknown Source)
   at org.alfresco.web.bean.ImportBean$1.execute(ImportBean.java:120)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.web.bean.ImportBean.performImport(ImportBean.java:129)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:109)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.service.cmr.view.ImporterException: Association {custom.model}Thumbnail is not valid for node {http://www.alfresco.org/model/content/1.0}folder
   at org.alfresco.repo.importer.view.ParentContext.<init>(ParentContext.java:115)
   at org.alfresco.repo.importer.view.ViewParser.processStartAssoc(ViewParser.java:759)
   at org.alfresco.repo.importer.view.ViewParser.processStartElement(ViewParser.java:324)
   at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:175)
   … 80 more

Any one has any Idea?
7 REPLIES 7

itayh
Champ in-the-making
Champ in-the-making
Hi,

Let me be more specific.

1 - I define a rule that for every content add association.
2 - I add some contents to space (and fill their association value)
3 - Export this space.
4 - Import this space to different location (will be used for different alfresco at later stage)

The problem I have is in ParentContext class in the next code:
if (nodeAssociations.containsKey(assocDef.getName()) == false)
            {
                throw new ImporterException("Association " + assocDef.getName() + " is not valid for node " + parent.getTypeDefinition().getName());
            }

The problem is that the node does not seem to have this association.

Any solution?

itayh
Champ in-the-making
Champ in-the-making
Any one have any idea?  :roll:

itayh
Champ in-the-making
Champ in-the-making
Hi,

I still did not find solution for that issue so for mean while I just did:
//if (nodeAssociations.containsKey(assocDef.getName()) == false)
            //{
            //    throw new ImporterException("Association " + assocDef.getName() + " is not valid for node " + parent.getTypeDefinition().getName());
            //}

Someone knows of another solution?

One more Q:

I use for import the CREATE_NEW_WITH_UUID option. I create a space, export it, delete it and than import it. Then I try to delete it again. It fails with:
Caused by:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry 'archive-SpacesStore-4ea4e2fc-5f60-11dc-800c-d9be1657e4da' for key 2


The import-Export is one of the most important parts in our system, yet we have many problems with it.

Anyone have any Idea?

Thanks in advance,
  Itay

nyronian
Champ in-the-making
Champ in-the-making
Itay,

I am having the same issue, Import/Export is a vital part of our system as well….have you found a solution?

itayh
Champ in-the-making
Champ in-the-making
Hi,

I have no solution yet. Still waiting…

We use
//if (nodeAssociations.containsKey(assocDef.getName()) == false)
//{
// throw new ImporterException("Association " + assocDef.getName() + " is not valid for node " + parent.getTypeDefinition().getName());
//}

but obviously that is not solution  :roll:

nyronian
Champ in-the-making
Champ in-the-making
Itay,

I am more specfically getting the error:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry 'archive-SpacesStore-….' for key 2
  
I assume commenting that line of code out will only fix the first stated error.

Have you found a fix for the duplicate entry error?

Thanks for your help

itayh
Champ in-the-making
Champ in-the-making
Hi,

I am not sure but maybe settting archive to false in the model xml will fix it.

Itay