cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco on Suse, Tomcat war deployment problems

jurgisl
Champ in-the-making
Champ in-the-making
Hi!

For last few days I've been trying to deploy Alfresco 2.1 community version's ".war" file in our Tomcat server. We have:
OpenSuse Linux 10.3 (beta3)
Tomcat 5.0
Sun Java 1.5.0_08
MySQL 5.0.26

At first I struggled with configuration, because Suse's standard Tomcat installation somehow ignores /shared/classes folder and I had to move /alfresco/extension configuration folder to /common/classes folder (not right, but it works).

And now I cannot get past this error:

StandardContext[/manager]HTMLManager: start: Starting web application at '/alfresco'
StandardContext[/alfresco]Loading Spring root WebApplicationContext
StandardContext[/alfresco]Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schemaBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'patch.schemaUpdateScript-V1.4-1' while setting bean property 'preUpdateScriptPatches' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.schemaUpdateScript-V1.4-1' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Cannot resolve reference to bean 'patchComponent' while setting bean property 'patchService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patchComponent' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Cannot resolve reference to bean 'descriptorComponent' while setting bean property 'descriptorService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'systemBootstrap' while setting bean property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'importerComponent' while setting bean property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.schemaUpdateScript-V1.4-1' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Cannot resolve reference to bean 'patchComponent' while setting bean property 'patchService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patchComponent' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Cannot resolve reference to bean 'descriptorComponent' while setting bean property 'descriptorService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'systemBootstrap' while setting bean property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'importerComponent' while setting bean property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patchComponent' defined in file [/srv/www/tomcat5/base/webapps/alfresco/WEB-INF/classes/alfresco/patch/patch-services-context.xml]: Cannot resolve reference to bean 'descriptorComponent' while setting bean property 'descriptorService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'systemBootstrap' while setting bean property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'importerComponent' while setting bean property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'systemBootstrap' while setting bean property 'systemBootstrap'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'importerComponent' while setting bean property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]: Cannot resolve reference to bean 'importerComponent' while setting bean property 'importerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerComponent' defined in class path resource [alfresco/import-export-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService_security' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting bean property 'providers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'authenticationDao' while setting bean property 'authenticationDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationDao' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'passwordEncoder' while setting bean property 'passwordEncoder'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordEncoder' defined in class path resource [alfresco/authentication-services-context.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
   at sun.reflect.GeneratedConstructorAccessor444.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

I could not find anything on this in forums (there was one similar post, but had no meaningful solution). And I cannot think of anything that could be missing (except I didn't put anything in "endorsed" folder, but that was optional…or not?). I followed included readme files, and configured Alfresco to use MySQL database. Tried to redeploy alfresco.war file several times, but always I got this far and was stopped by that error.

What could cause that error? Are there any extra libraries necessary?
5 REPLIES 5

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

You're getting a lot of NoClassDefFoundError exceptions. Make sure your classpath includes the JARs in alfresco.war/WEB-INF/lib and also make sure you don't have class loader issues. Alfresco is a Spring/Hibernate/JSF application and it comes bundled with its own versions of those JARs. If your Tomcat has some of those JARs on the shared classpath with different versions then that might be a problem.

Hope this helps,

-Aladdin

jurgisl
Champ in-the-making
Champ in-the-making
Thanks! I'll try out deploying Alfresco on clean Tomcat installation, as I have a bunch of other tomcat apps deployed on that server (Laszlo, eXist, Orbeon). So far, none of them conflicted, only Alfresco is not so friendly Smiley Happy

steve
Champ in-the-making
Champ in-the-making
Hi,

Have you looked at all the instructions here:
http://wiki.alfresco.com/wiki/Installing_on_Linux

Steve

jurgisl
Champ in-the-making
Champ in-the-making
Hi Steve,

I read trough most of them, except - 
# Download and install MySQL in Linux.
# Download and install PHP in Linux (optional).
and
# Linux Quick Install
.. thought that these instructions didn't apply to my problem.

But at last, I got it running.. not sure how. It seems that Alfresco didn't like some .jar's in my /common/lib folder or maybe changing CLASSPATH environmental variable did help after all.. and reading through more documentation/forums I found some MySQL configuration errors I had. Maybe that.. but after numerous Tomcat restarts Alfresco did start without errors Smiley Happy

Deployed on clean Suse Tomcat installation, Alfresco worked ok, but then again, there were problems with Tomcat's "shared" folder not being used/seen by Alfresco and I had to use "common" folder for my configuration. But at least it showed me that Alfresco can be run on Suse and Tomcat with default configuration, so I knew that my problems could be resolved and the answer most probably was in Tomcat's configuration.

I'll post again if someday I will find what was behind that error Smiley Wink

Thanks, for your answers!

jurgisl
Champ in-the-making
Champ in-the-making
Well, I found what caused that error Smiley Happy
Because I had other apps deployed on this Tomcat server, I mostly did not restart whole Tomcat server, if I changed only some config files. But instead, I used Tomcat Manager applet to restart Alfresco application. And that caused this error to appear and Alfresco not to start. Restarting whole Tomcat server resolved this. I'm not enough experienced in Tomcat, to know what and why, but that just solved my problem Smiley Happy