cancel
Showing results for 
Search instead for 
Did you mean: 

3.3 Upgrade: Failed to read Webscript

luca
Star Contributor
Star Contributor
Hi,
I'm upgrading Alfresco from version 3.0 to 3.3, but i have some issues.

If I start Alfresco with a new repository and an empty DB all is OK, but when I change the reference of dir.root and DB to the old ones used by Alfresco 3.0 the initialization go wrong.
The upgrade process of the database don't log any error, but when alfresco ty to load webscript it logs me that it can't read content at org/alfresco/sample/folder.get.desc.xml (content reader does not exist).

I tried to start with a FULL reindex, but it didn't work.  Smiley Sad

This is a the log of the error:
10:44:46,245  INFO  [service.descriptor.DescriptorService] Alfresco started (Community): Current version 3.3.0 (2765) schema 4009 - Originally installed version 3.0.0 (Stable 1526) schema 1002

10:45:28,988 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Initialising Web Scripts (Container: Repository, URI index: org.springframework.extensions.webscripts.JaxRSUriIndex)

10:45:28,994 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Locating package descriptions within workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts
10:45:31,181 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Locating schema descriptions within workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts
10:45:31,457 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Locating Web Scripts within workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts

10:45:31,548 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Locating package descriptions within workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts
10:45:33,250 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Locating schema  descriptions within workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts
10:45:33,298 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Locating Web Scripts within workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts

10:45:33,808 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Found Web Script org/alfresco/sample/blogsearch.get (desc: org/alfresco/sample/blogsearch.get.desc.xml, impl: webscript.default, auth: guest, trx: required, format style: extension, default format: html)
10:45:33,816 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Registered Web Script URL 'GET:/sample/blog/search?q={searchTerm}'
10:45:33,816 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Registered Web Script URL 'GET:/sample/blog/search.atom?q={searchTerm}'
10:45:33,816 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Registered Web Script URL 'GET:/sample/b/s?q={searchTerm}'
10:45:33,816 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Registered Web Script URL 'GET:/sample/b/s.atom?q={searchTerm}'

10:45:33,984 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Found Web Script org/alfresco/sample/categorysearch.get (desc: org/alfresco/sample/categorysearch.get.desc.xml, impl: webscript.default, auth: guest, trx: required, format style: argument, default format: html)
10:45:33,984 User:System DEBUG [extensions.webscripts.DeclarativeRegistry] Registered Web Script URL 'GET:/sample/blog/category/{category}'
10:45:34,022 User:System INFO  [extensions.webscripts.AbstractRuntimeContainer] Initialised Repository Web Script Container (in 5502.052ms)
10:45:34,028  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 03280001 Exception in Transaction.
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:406)
        at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:552)
        at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:550)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
        at org.alfresco.repo.web.scripts.RepoStore.getDocument(RepoStore.java:548)
        at org.springframework.extensions.webscripts.DeclarativeRegistry.initWebScripts(DeclarativeRegistry.java:360)
        at org.springframework.extensions.webscripts.DeclarativeRegistry.reset(DeclarativeRegistry.java:172)
        at org.springframework.extensions.webscripts.AbstractRuntimeContainer.reset(AbstractRuntimeContainer.java:226)
        at org.alfresco.repo.web.scripts.RepositoryContainer.init(RepositoryContainer.java:559)
        at org.alfresco.repo.web.scripts.RepositoryContainer.reset(RepositoryContainer.java:533)
        at org.alfresco.repo.web.scripts.RepositoryContainer$4.doWork(RepositoryContainer.java:487)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
        at org.alfresco.repo.web.scripts.RepositoryContainer.onApplicationEvent(RepositoryContainer.java:491)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.io.IOException: Failed to read content at org/alfresco/sample/folder.get.desc.xml (content reader does not exist)
        at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:564)
        at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:554)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
        … 44 more
10:45:34,031  ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: 03280001 Exception in Transaction.
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:406)
        at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:552)
        at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:550)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
        at org.alfresco.repo.web.scripts.RepoStore.getDocument(RepoStore.java:548)
        at org.springframework.extensions.webscripts.DeclarativeRegistry.initWebScripts(DeclarativeRegistry.java:360)
        at org.springframework.extensions.webscripts.DeclarativeRegistry.reset(DeclarativeRegistry.java:172)
        at org.springframework.extensions.webscripts.AbstractRuntimeContainer.reset(AbstractRuntimeContainer.java:226)
        at org.alfresco.repo.web.scripts.RepositoryContainer.init(RepositoryContainer.java:559)
        at org.alfresco.repo.web.scripts.RepositoryContainer.reset(RepositoryContainer.java:533)
        at org.alfresco.repo.web.scripts.RepositoryContainer$4.doWork(RepositoryContainer.java:487)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
        at org.alfresco.repo.web.scripts.RepositoryContainer.onApplicationEvent(RepositoryContainer.java:491)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.io.IOException: Failed to read content at org/alfresco/sample/folder.get.desc.xml (content reader does not exist)
        at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:564)
        at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:554)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
        … 44 more
10:45:34,032  ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.alfresco.error.AlfrescoRuntimeException: 03280001 Exception in Transaction.
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:406)
        at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:552)
        at org.alfresco.repo.web.scripts.RepoStore$7.doWork(RepoStore.java:550)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
        at org.alfresco.repo.web.scripts.RepoStore.getDocument(RepoStore.java:548)
        at org.springframework.extensions.webscripts.DeclarativeRegistry.initWebScripts(DeclarativeRegistry.java:360)
        at org.springframework.extensions.webscripts.DeclarativeRegistry.reset(DeclarativeRegistry.java:172)
        at org.springframework.extensions.webscripts.AbstractRuntimeContainer.reset(AbstractRuntimeContainer.java:226)
        at org.alfresco.repo.web.scripts.RepositoryContainer.init(RepositoryContainer.java:559)
        at org.alfresco.repo.web.scripts.RepositoryContainer.reset(RepositoryContainer.java:533)
        at org.alfresco.repo.web.scripts.RepositoryContainer$4.doWork(RepositoryContainer.java:487)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
        at org.alfresco.repo.web.scripts.RepositoryContainer.onApplicationEvent(RepositoryContainer.java:491)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.io.IOException: Failed to read content at org/alfresco/sample/folder.get.desc.xml (content reader does not exist)
        at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:564)
        at org.alfresco.repo.web.scripts.RepoStore$7$1.execute(RepoStore.java:554)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
        … 44 more
Apr 28, 2010 10:45:34 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 28, 2010 10:45:34 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
3 REPLIES 3

luca
Star Contributor
Star Contributor
Hi all,
I found that the problem wasn't related to the upgrade, but in the repository itself. I tried to restart Alfresco 3.0 with the original repository and I get the same error!

I modified org.springframework.extensions.webscripts.DeclarativeRegistry to exclude from the registration the webscript under org/alfresco/sample and Alfresco 3.3 started succesfully!   Smiley Very Happy

The webscript that caused all the problem is org/alfresco/sample/blogsearch.get.desc.xml. I think that is hidden in the database somewhere…  :?:

Anybody can give me some hint? Where can I find that webscript? How can I fix it? Can I remove it without any problem?

luca
Star Contributor
Star Contributor
I replaced the broken webscript with a new one deleting it from the WebClient and uploading a new one from a working copy of alfresco.

That's all!

mruflin
Champ in-the-making
Champ in-the-making
I had exactly the same problem when upgrading an instance from 3.2E to 3.2.1E.

For some unknown reason, the binary data of folder.get.desc.xml was *missing*, thus the cm:content property linking to a non-existing file on the disk.

If you run into the same issue when you already started/finished the upgrading process, you can fix this afterwards:

Edit one of the two files (the second if you have enterprise edition, otherwise the first):
webapps/alfresco/WEB-INF/classes/alfresco/web-scripts-application-context.xml
webapps/alfresco/WEB-INF/classes/alfresco/enterprise-web-scripts-application-context.xml

Search for following bean:
   <bean id="webscripts.searchpath" class="org.alfresco.web.scripts.SearchPath">
      <property name="searchPath">
          <list>
             <ref bean="webscripts.store.repo.extension" />
             <ref bean="webscripts.store.repo" />
             <ref bean="webscripts.store.client.extension" />
             <ref bean="webscripts.store.client" />
             <ref bean="webscripts.enterprise.store" />
             <ref bean="webscripts.store" />
          </list>
      </property>
   </bean>

and comment the first two referenced beans (repo.extension and repo). This will in fact disable webscript lookup inside the Repository, and only load webscripts located in the webapps/alfresco/… directories.

Once done, you can bring up Alfresco again (which should now not fail anymore) and manually fix the script(s) in question. Either delete the description file or simply upload a new version of the file, no need to completely delete/recreate the file completely.

Finally, stop the server, undo the changes in the xml file and restart. Alfresco should now start correctly.

It remains a mystery though why the file was missing in the repository…