cancel
Showing results for 
Search instead for 
Did you mean: 

Error starting Alfresco after AMP installation

andrea81it
Champ in-the-making
Champ in-the-making
Hi,
i found and installed an AMP extension which provide hyperlinks for associations:

http://wiki.alfresco.com/wiki/AMP_for_Web_Client_Links_in_Associations

installed following instructions here:

http://wiki.alfresco.com/wiki/Module_Management_Tool

…and configured the AMP as described, with a faces-config-custom.xml file in my Eclipse project, deployed using the usual ANT script.
Starting Alfresco, i have a "bad stack trace":

09:45:34,531  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL
location [classpath:alfresco/application-context.xml]
Offending resource: ServletContext resource [/WEB-INF/web-application-context.xml]; nested exception is org.springframework.beans.factory.Be
anDefinitionStoreException: IOException parsing XML document from class path resource [alfresco/application-context.xml]; nested exception i
s java.io.FileNotFoundException: class path resource [alfresco/application-context.xml] cannot be opened because it does not exist
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [alfres
co/application-context.xml]; nested exception is java.io.FileNotFoundException: class path resource [alfresco/application-context.xml] canno
t be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [alfresco/application-context.xml] cannot be opened because it does not exist
        at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:307)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)

        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)

        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocum
entReader.java:171)

What's wrong?
Before the installation, it worked all fine…
Maybe the faces-config.custom.xml is in a wrong place? I tried to put in in webapps/alfresco/WEB-INF and in webapps/alfresco/WEB-INF/classes/alfresco/extension, but i can't solve this problem and the worst thing is that i can't remove the AMP extension.
Thank you very much in advance!
5 REPLIES 5

kbonnet
Champ in-the-making
Champ in-the-making
I think you need to look into the log message:

Caused by: java.io.FileNotFoundException: class path resource [alfresco/application-context.xml] cannot be opened because it does not exist

andrea81it
Champ in-the-making
Champ in-the-making
It's a good starting point…i created the file application-context.xml in WEB-INF/classes/alfresco and tried to start Tomcat: i got several stacktrace like this:

16:10:26,203  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webscripts.searchpath' defined in class path resourc
e [alfresco/web-scripts-application-context.xml]: Cannot resolve reference to bean 'webscripts.store.repo.extension' while setting bean prop
erty 'searchPath' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '
webscripts.store.repo.extension' defined in class path resource [alfresco/web-scripts-application-context.xml]: Cannot resolve reference to
bean 'retryingTransactionHelper' while setting bean property 'transactionHelper'; nested exception is org.springframework.beans.factory.NoSu
chBeanDefinitionException: No bean named 'retryingTransactionHelper' is defined
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webscripts.store.repo.extension' defined
in class path resource [alfresco/web-scripts-application-context.xml]: Cannot resolve reference to bean 'retryingTransactionHelper' while se
tting bean property 'transactionHelper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named
'retryingTransactionHelper' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'retryingTransactionHelper' is defined
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:360)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:914)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:241)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:11
0)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFacto
ry.java:1100)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java
:862)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:4
23)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:11
0)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:13
2)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFacto
ry.java:1100)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java
:862)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:4
23)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)

…so i started to follow the definitions of beans trough the Spring configuration files from web-application-context.xml.
Do i have to add other classpath reference in my application-context.xml?
I thought that using the AMP previously described would be a "ready to use" solution…but now i think it's not so.
I read that is not so easy to uninstall AMP packages…is there a way to revert my Alfresco customization?
Thank you very much!

kbonnet
Champ in-the-making
Champ in-the-making
Your webapp in tomcat/webapps/alfresco is messed up.
If you never touched that location for other customizations and if the alfresco.war file is still there, you can delete the alfresco folder there. On next start, tomcat wil unzip the alfresco.war again and you have a fresch start. The module management tool also did a backup of the alfresco.war when you patched it with the amp.

hope this helps.

meganjo
Champ in-the-making
Champ in-the-making
Thanx for sharing…
————-
Dedicated  Linux Server Hosting

andrea81it
Champ in-the-making
Champ in-the-making
Thank you for the tip!!
I restored Alfresco with your suggestion and reconfigured with my own models and web-client-config custom.