AnsweredAssumed Answered

[Error]The association source type is incorrect. [Question] How to start the creation of a folder hierarchy of a Site?

Question asked by mbel on Nov 30, 2016
Latest reply on Nov 30, 2016 by afaust


I am trying to create a Site and folders hierarchy programmatically using Java API.

After the new Site is created, I get the groupName and find the NodeRef of the authority (GROUP_site)

String groupSite = this.siteService.getSiteGroup(newSite.getShortName());
NodeRef groupSiteNodeRef = this.authorityService.getAuthorityNodeRef(groupSite);


And after that start creating the folders as assign them first to groupSiteNodeRef :


                  ( groupSiteNodeRef ,
                   QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, name),


However, I receive the following ERROR:


ERROR [node.integrity.IntegrityChecker] [http-bio-8080-exec-2] Found 1 integrity violations:
The association source type is incorrect:
Source Node: workspace://SpacesStore/3c68c987-c9af-4baa-8b6c-e0720f534cbc
Association: Association[ class=ClassDef[



target class={}base, source role=null, target role=null]
Required Source Type: {}folder
Actual Source Type: {}authorityContainer
at org.alfresco.repo.node.integrity.IntegrityChecker.checkIntegrity(


So, obviously it doesn't like that I have a folder which is assign to the GROUP_site.

Could someone tells me what I did wrong?

How to start the creation of a folder hierarchy of a Site?


Thank you in advance.