AssociationExistsException when update new document version

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
superdh
Active Member

AssociationExistsException when update new document version

Hello,

When i try to update a new document version which contains at least one association, it shows me the following error :

2019-05-15 09:12:23,224 ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-29] Exception from executeScript: 04150022 Unexpected error occurred during upload of new content.
org.springframework.extensions.webscripts.WebScriptException: 04150022 Unexpected error occurred during upload of new content.
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1124)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
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: org.alfresco.service.cmr.repository.AssociationExistsException
at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newNodeAssoc(AbstractNodeDAOImpl.java:2954)
at org.alfresco.repo.node.db.DbNodeServiceImpl.createAssociation_aroundBody86(DbNodeServiceImpl.java:2080)
at org.alfresco.repo.node.db.DbNodeServiceImpl$AjcClosure87.run(DbNodeServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
at org.alfresco.repo.node.db.DbNodeServiceImpl.createAssociation(DbNodeServiceImpl.java:2067)
at sun.reflect.GeneratedMethodAccessor857.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:244)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy45.createAssociation(Unknown Source)
at sun.reflect.GeneratedMethodAccessor857.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:111)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy45.createAssociation(Unknown Source)
at sun.reflect.GeneratedMethodAccessor857.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:231)
at com.sun.proxy.$Proxy73.createAssociation(Unknown Source)
at org.alfresco.repo.copy.CopyServiceImpl.copyPendingAssociations(CopyServiceImpl.java:865)
at org.alfresco.repo.copy.CopyServiceImpl.copy(CopyServiceImpl.java:277)
at org.alfresco.repo.copy.CopyServiceImpl.copy(CopyServiceImpl.java:345)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:256)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:216)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:171)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy142.copy(Unknown Source)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$1.doWork(CheckOutCheckInServiceImpl.java:465)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$1.doWork(CheckOutCheckInServiceImpl.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.doCheckout(CheckOutCheckInServiceImpl.java:461)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout_aroundBody2(CheckOutCheckInServiceImpl.java:414)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$AjcClosure3.run(CheckOutCheckInServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout(CheckOutCheckInServiceImpl.java:385)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout_aroundBody0(CheckOutCheckInServiceImpl.java:380)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$AjcClosure1.run(CheckOutCheckInServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout(CheckOutCheckInServiceImpl.java:374)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:256)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:216)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:171)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy145.checkout(Unknown Source)
at org.alfresco.repo.jscript.ScriptNode.checkout(ScriptNode.java:2561)
at org.alfresco.repo.jscript.ScriptNode.checkoutForUpload(ScriptNode.java:2582)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_105._c_main_6(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js:353)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_105.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_105._c_script_0(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js:523)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_105.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_105.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_105.exec(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:207)
at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:219)
at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:181)
at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:109)
at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1376)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
... 32 more
2019-05-15 09:12:23,253 ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-26] Exception from executeScript: 04150023 Wrapped Exception (with status template): 04151075 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': 04151074 Invalid node ref - does not contain forward slash: undefined
org.springframework.extensions.webscripts.WebScriptException: 04150023 Wrapped Exception (with status template): 04151075 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': 04151074 Invalid node ref - does not contain forward slash: undefined
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1138)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:512)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
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: org.alfresco.scripts.ScriptException: 04151075 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': 04151074 Invalid node ref - does not contain forward slash: undefined
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:211)
at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:219)
at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:181)
at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:109)
at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1376)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
... 32 more
Caused by: org.alfresco.service.cmr.repository.MalformedNodeRefException: 04151074 Invalid node ref - does not contain forward slash: undefined
at org.alfresco.service.cmr.repository.NodeRef.<init>(NodeRef.java:113)
at org.alfresco.repo.jscript.Search.findNode(Search.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_metadata_metadata_get_js_106._c_main_1(classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js:12)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_metadata_metadata_get_js_106.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_metadata_metadata_get_js_106._c_script_0(classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js:32)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_metadata_metadata_get_js_106.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_metadata_metadata_get_js_106.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_metadata_metadata_get_js_106.exec(classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:207)
... 37 more

The same error happens when I try to revert the version to a previous one. If I don't put any association, there is no problem.

Here is my model with associations : 

<aspects>
   <aspect name="alpro:common">
      <title>ALPRO - Common</title>
      <properties>
      ...
      </properties>
      <associations>
         <association name="alpro:sme">
            <title>SME</title>
            <source>
               <mandatory>false</mandatory>
               <many>true</many>
            </source>
            <target>
               <class>cm:authority</class>
               <mandatory>false</mandatory>
               <many>true</many>
            </target>
         </association>
         <association name="alproSmiley Tonguerocess-owner">
            <title>Process owner</title>
            <source>
               <mandatory>false</mandatory>
               <many>true</many>
            </source>
            <target>
               <class>cm:authority</class>
               <mandatory>false</mandatory>
               <many>true</many>
            </target>
         </association>
         <association name="alpro:ams-ambassador">
            <title>AMS ambassador</title>
            <source>
               <mandatory>false</mandatory>
               <many>true</many>
            </source>
            <target>
               <class>cm:authority</class>
               <mandatory>false</mandatory>
               <many>true</many>
            </target>
         </association>
      </associations>
      <overrides/>
      <mandatory-aspects/>
   </aspect>
</aspects>

Can someone tell me why I have this error and how to fix it ? Thanks.

3 Replies
douglascrp
Advanced II

Re: AssociationExistsException when update new document version

Hello.

Call you tell how you are executing this update?

Have you customized share in any way to execute some custom logic or something like that?

I am asking this because I noticed the following error message:

2019-05-15 09:12:23,253 ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-26] Exception from executeScript: 04150023 Wrapped Exception (with status template): 04151075 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': 04151074 Invalid node ref - does not contain forward slash: undefined
org.springframework.extensions.webscripts.WebScriptException: 04150023 Wrapped Exception (with status template): 04151075 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/metadata/metadata.get.js': 04151074 Invalid node ref - does not contain forward slash: undefined

superdh
Active Member

Re: AssociationExistsException when update new document version

Thanks for your answer. Indeed, i was changing the dnd-upload file to open a popup after upload a file.

If I delete my modifications, i have a similar error :

2019-05-20 17:16:14,554 ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-63] Exception from executeScript: 04200095 Unexpected error occurred during upload of new content.
org.springframework.extensions.webscripts.WebScriptException: 04200095 Unexpected error occurred during upload of new content.
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1124)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
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: org.alfresco.service.cmr.repository.AssociationExistsException
at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.newNodeAssoc(AbstractNodeDAOImpl.java:2954)
at org.alfresco.repo.node.db.DbNodeServiceImpl.createAssociation_aroundBody86(DbNodeServiceImpl.java:2080)
at org.alfresco.repo.node.db.DbNodeServiceImpl$AjcClosure87.run(DbNodeServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
at org.alfresco.repo.node.db.DbNodeServiceImpl.createAssociation(DbNodeServiceImpl.java:2067)
at sun.reflect.GeneratedMethodAccessor1219.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:244)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy45.createAssociation(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1219.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:111)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy45.createAssociation(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1219.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:231)
at com.sun.proxy.$Proxy73.createAssociation(Unknown Source)
at org.alfresco.repo.copy.CopyServiceImpl.copyPendingAssociations(CopyServiceImpl.java:865)
at org.alfresco.repo.copy.CopyServiceImpl.copy(CopyServiceImpl.java:277)
at org.alfresco.repo.copy.CopyServiceImpl.copy(CopyServiceImpl.java:345)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:256)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:216)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:171)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy142.copy(Unknown Source)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$1.doWork(CheckOutCheckInServiceImpl.java:465)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$1.doWork(CheckOutCheckInServiceImpl.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.doCheckout(CheckOutCheckInServiceImpl.java:461)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout_aroundBody2(CheckOutCheckInServiceImpl.java:414)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$AjcClosure3.run(CheckOutCheckInServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout(CheckOutCheckInServiceImpl.java:385)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout_aroundBody0(CheckOutCheckInServiceImpl.java:380)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl$AjcClosure1.run(CheckOutCheckInServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
at org.alfresco.repo.coci.CheckOutCheckInServiceImpl.checkout(CheckOutCheckInServiceImpl.java:374)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:256)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:216)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:171)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy145.checkout(Unknown Source)
at org.alfresco.repo.jscript.ScriptNode.checkout(ScriptNode.java:2561)
at org.alfresco.repo.jscript.ScriptNode.checkoutForUpload(ScriptNode.java:2582)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_592._c_main_6(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js:353)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_592.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_592._c_script_0(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js:523)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_592.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_592.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_upload_upload_post_js_592.exec(classpath*:alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:207)
at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:219)
at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:181)
at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:109)
at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1376)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
... 32 more

I don't know if there are other customizations in the code. 

The error happens when I try to upload a new version. The code breaks at this line in the dnd-upload file : 

if (this.uploadMethod === this.FORMDATA_UPLOAD)
{
   // For Browsers that support it (currently FireFox 4), the FormData object is the best
   // object to use for file upload as it supports asynchronous multipart upload without
   // the need to read the entire object into memory.
   Alfresco.logger.debug("Using FormData for file upload");
   var formData = new FormData;
   formData.append("filedata", fileInfo.uploadData.filedata);
   formData.append("filename", fileInfo.uploadData.filename);
   formData.append("destination", fileInfo.uploadData.destination);
   formData.append("uploaddirectory", fileInfo.uploadData.uploaddirectory);
   formData.append("createdirectory", fileInfo.uploadData.createdirectory ? "true" : "false");
   formData.append("majorVersion", fileInfo.uploadData.majorVersion ? "true" : "false");
   formData.append("username", fileInfo.uploadData.username);
   formData.append("overwrite", fileInfo.uploadData.overwrite);
   formData.append("thumbnails", fileInfo.uploadData.thumbnails);
   formData.append("updatenameandmimetype", fileInfo.uploadData.updateNameAndMimetype)

   if (fileInfo.uploadData.updateNodeRef)
   {
      formData.append("updateNodeRef", fileInfo.uploadData.updateNodeRef);
   }
   else
   {
      formData.append("siteId", fileInfo.uploadData.siteId);
      formData.append("containerId", fileInfo.uploadData.containerId);
   }

   if (fileInfo.uploadData.description)
   {
      formData.append("description", fileInfo.uploadData.description);
   }

   fileInfo.request.open("POST", url, true);
   fileInfo.request.send(formData); // Error 500

I don't know how to fix it, thanks if you can help.

superdh
Active Member

Re: AssociationExistsException when update new document version

I finally fixed it but I don't know why the first solution didn't work (if anyone has an explanation ?)

The problem is in the model, with the association in a parent aspect :

<aspect name="ns:common">
   <properties>
      ...
   </properties>
   <associations>
      <association name="nsSmiley Tonguerop">
         <source>
            <mandatory>false</mandatory>
            <many>true</many>
         </source>
         <target>
            <class>cm:authority</class>
            <mandatory>false</mandatory>
            <many>true</many>
         </target>
      </association>
   <associations>
</aspect>
<aspect name="nsSmiley Tongueroduction">
   <parent>ns:common</parent>
   <properties>
      ...
   </properties>
</aspect>
<aspect name="ns:maintenance">

   <parent>ns:common</parent>
   <properties>
      ...
   </properties>
</aspect>

I moved the association from the common aspect to children aspects and it worked (with 2 different names) :

<aspect name="ns:common">
   <properties>
      ...
   </properties>
</aspect>
<aspect name="nsSmiley Tongueroduction">
   <parent>ns:common</parent>
   <properties>
      ...
   </properties>
   <associations>
      <association name="nsSmiley Tonguerop-production">
         <source>
            <mandatory>false</mandatory>
            <many>true</many>
         </source>
         <target>
            <class>cm:authority</class>
            <mandatory>false</mandatory>
            <many>true</many>
         </target>
      </association>
   <associations>
</aspect>
<aspect name="ns:maintenance">
   <parent>ns:common</parent>
   <properties>
      ...
   </properties>
   <associations>
      <association name="nsSmiley Tonguerop-maintenance">
         <source>
            <mandatory>false</mandatory>
            <many>true</many>
         </source>
         <target>
            <class>cm:authority</class>
            <mandatory>false</mandatory>
            <many>true</many>
         </target>
      </association>
   <associations>
</aspect>