Hi,
I would like to bootstrap the creation of a site through Java code:
SiteInfo siteInfo = siteService.createSite("site-dashboard", "my-site", "Site", "This site", SiteVisibility.PRIVATE);However, when the bootstrap is executed I get the following error for the creation of the site:
2017-05-23 13:28:48,861 ERROR [admin.patch.PatchExecuter] [main] 04230011 org.alfresco.repo.security.authority.UnknownAuthorityException: 04230010 An authority was not found for System
at org.alfresco.repo.security.authority.AuthorityDAOImpl.addAuthority(AuthorityDAOImpl.java:346)
at org.alfresco.repo.security.authority.AuthorityServiceImpl.addAuthority(AuthorityServiceImpl.java:456)
at org.alfresco.repo.security.authority.AuthorityServiceImpl.addAuthority(AuthorityServiceImpl.java:448)
at org.alfresco.repo.site.SiteServiceImpl$3.doWork(SiteServiceImpl.java:705)
at org.alfresco.repo.site.SiteServiceImpl$3.doWork(SiteServiceImpl.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
at org.alfresco.repo.site.SiteServiceImpl.setupSitePermissions(SiteServiceImpl.java:609)
at org.alfresco.repo.site.SiteServiceImpl.setupSitePermissions(SiteServiceImpl.java:599)
at org.alfresco.repo.site.SiteServiceImpl.createSite(SiteServiceImpl.java:567)
at org.alfresco.repo.site.SiteServiceImpl.createSite(SiteServiceImpl.java:478)
From what I understand from the source code, the code adds the current user "System" as a Site Manager. The code runs that portion of code as "System".
My version of Alfresco is Community Edition 201602.
Any idea how I could make this working?
Thanks in advance,
Philippe