Error importing content model with 'associations' between types

cancel
Showing results for 
Search instead for 
Did you mean: 
IBelyaeva
Member II

Error importing content model with 'associations' between types

I use Alfresco Community - 7.1.0 (rb9f449df-blocal).

When I try to import content model with 'associations' between types through Model Manager (Admin Tools -> Model Manager -> Import Model) I get the error:

"There was a problem importing the file. Try removing the existing model before importing another. The custom model doesn't support the 'associations' element."

I have created very simple model to test. If tag 'associations' is commented then all is ok. I wonder what's wrong?

<?xml version="1.0" encoding="UTF-8"?>
<!-- xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0 modelSchema.xsd" -->
<model xmlns="http://www.alfresco.org/model/dictionary/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="cm_test:contentmodel_test">
   <description>Alfresco Content Domain Model TEST</description>
   <author>Test</author>
   <published>2022-06-29</published>
   <version>1.10</version>
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
   </imports>
   <namespaces>
      <namespace uri="http://www.alfresco_test.org/model/content_test/1.10" prefix="cm_test" />
   </namespaces>
   <types>
      <type name="cm_test:authority_test">
         <title>Alfresco Authority Abstract Type</title>
         <parent>cm:content</parent>
      </type>
      <type name="cm_test:zone_test">
         <title>Alfresco Authentication Zone Type</title>
         <parent>cm:content</parent>
         <properties />
         <associations>
            <child-association name="cm_test:inZone_test">
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm_test:authority_test</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
               <duplicate>false</duplicate>
            </child-association>
         </associations>
      </type>
   </types>
</model>

 Logs:

alfresco_1 | 2022-08-31 08:30:45,577 ERROR [extensions.webscripts.AbstractRuntime] [http-nio-8080-exec-9] Exception from executeScript: 07310011 The custom model doesn't support the 'associations' element.
alfresco_1 | org.springframework.extensions.webscripts.WebScriptException: 07310011 The custom model doesn't support the 'associations' element.
alfresco_1 | at org.alfresco.repo.web.scripts.custommodel.CustomModelUploadPost.importModel(CustomModelUploadPost.java:250)
alfresco_1 | at org.alfresco.repo.web.scripts.custommodel.CustomModelUploadPost.processUpload(CustomModelUploadPost.java:186)
alfresco_1 | at org.alfresco.repo.web.scripts.custommodel.CustomModelUploadPost.executeImpl(CustomModelUploadPost.java:115)
alfresco_1 | at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
alfresco_1 | at org.alfresco.repo.web.scripts.RepositoryContainer.lambda$transactionedExecute$2(RepositoryContainer.java:556)
alfresco_1 | at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:450)
alfresco_1 | at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:539)
alfresco_1 | at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:663)
alfresco_1 | at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:699)
alfresco_1 | at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:412)
alfresco_1 | at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
alfresco_1 | at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
alfresco_1 | at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
alfresco_1 | at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:131)
alfresco_1 | at org.alfresco.repo.web.scripts.AlfrescoWebScriptServlet.service(AlfrescoWebScriptServlet.java:43)
alfresco_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
alfresco_1 | at jdk.internal.reflect.GeneratedMethodAccessor550.invoke(Unknown Source)
alfresco_1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
alfresco_1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:170)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:221)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
alfresco_1 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
alfresco_1 | at jdk.internal.reflect.GeneratedMethodAccessor545.invoke(Unknown Source)
alfresco_1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
alfresco_1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
alfresco_1 | at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93)
alfresco_1 | at jdk.internal.reflect.GeneratedMethodAccessor545.invoke(Unknown Source)
alfresco_1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
alfresco_1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
alfresco_1 | at org.springframework.extensions.webscripts.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:177)
alfresco_1 | at jdk.internal.reflect.GeneratedMethodAccessor545.invoke(Unknown Source)
alfresco_1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
alfresco_1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
alfresco_1 | at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
alfresco_1 | at jdk.internal.reflect.GeneratedMethodAccessor545.invoke(Unknown Source)
alfresco_1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
alfresco_1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
alfresco_1 | at org.alfresco.web.app.servlet.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:53)
alfresco_1 | at jdk.internal.reflect.GeneratedMethodAccessor545.invoke(Unknown Source)
alfresco_1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
alfresco_1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
alfresco_1 | at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
alfresco_1 | at java.base/java.security.AccessController.doPrivileged(Native Method)
alfresco_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
alfresco_1 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
alfresco_1 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
alfresco_1 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
alfresco_1 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
alfresco_1 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
alfresco_1 | at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)
alfresco_1 | at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
alfresco_1 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
alfresco_1 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
alfresco_1 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
alfresco_1 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
alfresco_1 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
alfresco_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1726)
alfresco_1 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
alfresco_1 | at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
alfresco_1 | at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
alfresco_1 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
alfresco_1 | at java.base/java.lang.Thread.run(Thread.java:829)
proxy_1 | 172.18.0.1 - - [31/Aug/2022:08:30:45 +0000] "POST /share/proxy/alfresco/api/cmm/upload?Alfresco-CSRFToken=AhqqEYvtElGj0IswLtvAJQYTJE9fkMgbNG4Clb1uvbQ%3D HTTP/1.1" 409 442 "http://127.0.0.1:8080/share/page/console/admin-console/custom-model-manager" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0"