Search code examples
alfrescoalfresco-webscripts

Alfresco - Context Initialization Failed at startup process


I have Alfresco Community Edition 5.2

I am getting the following error at catalina.out file, after computer restart

ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed org.springframework.extensions.webscripts.WebScriptException: 03230000 Web Script Store
workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts must exist; multiple entries found.

at org.alfresco.repo.web.scripts.RepoStore$1$1.execute(RepoStore.java:237)
at org.alfresco.repo.web.scripts.RepoStore$1$1.execute(RepoStore.java:219)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.web.scripts.RepoStore$1.doWork(RepoStore.java:218)
at org.alfresco.repo.web.scripts.RepoStore$1.doWork(RepoStore.java:215)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.web.scripts.RepoStore.getBaseNodeRef(RepoStore.java:214)
at org.alfresco.repo.web.scripts.RepoStore.exists(RepoStore.java:289)
at org.springframework.extensions.webscripts.SearchPath.getStores(SearchPath.java:110)
...    

org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.springframework.extensions.webscripts.WebScriptException: 03230000
Web Script Store workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts must exist; multiple entries found.
at org.alfresco.repo.web.scripts.RepoStore$1$1.execute(RepoStore.java:237)
at org.alfresco.repo.web.scripts.RepoStore$1$1.execute(RepoStore.java:219)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.web.scripts.RepoStore$1.doWork(RepoStore.java:218)
at org.alfresco.repo.web.scripts.RepoStore$1.doWork(RepoStore.java:215)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.web.scripts.RepoStore.getBaseNodeRef(RepoStore.java:214)
at org.alfresco.repo.web.scripts.RepoStore.exists(RepoStore.java:289)
...

Solution

  • It looks like someone has deleted a special folder in the Data Dictionary structure within the Alfresco Repository, which is hard-depended on within the startup process by the initialisation of web scripts. In this situation, it is hard to correct the issue without going back to a database backup where this structure still existed. Alternatively, you could customise the configuration of the web script lookup path and not depend on this particular folder any longer.

    You can remove/disable the lookup of the web script extensions folder by putting the following bean in a Spring context file in shared/classes/alfresco/extension/custom-web-context.xml

    <bean id="webscripts.searchpath"
       class="org.springframework.extensions.webscripts.SearchPath">
       <property name="searchPath">
          <list>
             <!-- This lookup in this store fails in your case -->
             <!-- <ref bean="webscripts.store.repo.extension" /> -->
             <!-- Comment the next line as well if you get a similar error
                  afterwards, indicating you are also missing a second folder -->
             <ref bean="webscripts.store.repo" />
             <ref bean="webscripts.store.client.extension" />
             <ref bean="webscripts.store.client" />
             <ref bean="webscripts.store.alfresco" />
             <ref bean="webscripts.store" />
          </list>
       </property>
    </bean>