Hello, I'm having trouble starting alfresco.war in tomcat server. I'm following the guide at https://docs.alfresco.com/6.0/concepts/ch-install.html.
When I click start for /alfresco in the tomcat server i get the error FAIL - Application at context path [/alfresco] could not be started.
Here's what I did.
1. I set up Apache Tomcat Server
2. I created the Postgres database(using the guide found at https://docs.alfresco.com/6.0/tasks/prep-filesys-db.html)
3. I create <Tomcat home>/shared
4. I create <Tomcat home>/shared/classes
5. I create <Tomcat home>/shared/lib
6. I then added "shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar"
to <TOMCAT_HOME>/conf/catalina.properties
7. I copied the postgres JDBC jar file from /home/user/alfresco-content-services-community-distribution-6.2.0-ga/web-server/lib to /home/user/apache-tomcat-9.0.37/shared/lib
8 I then configured the mutual TLS for solr communition(number 7 at https://docs.alfresco.com/6.0/tasks/configfiles-change-path.html)
9. I copied the war files from /home/user/alfresco-content-services-community-distribution-6.2.0-ga/web-server to /home/user/apache-tomcat-9.0.37/webapps
10. I copied alfresco.xml and share.xml from /home/user/alfresco-content-services-community-distribution-6.2.0-ga/web-server/conf/Catalina/localhost to /home/user/apache-tomcat-9.0.37/conf/Catalina/localhost
11. I copied the postgres JDBC jar file from /home/user/alfresco-content-services-community-distribution-6.2.0-ga/web-server/lib to /home/user/apache-tomcat-9.0.37/lib
12. I added alfresco-global.properties to /home/user/apache-tomcat-9.0.37/shared/classes
alfresco.log output:
2020-08-05 13:27:01,236 WARN [org.springframework.web.context.support.XmlWebApplicationContext] [Catalina-utility-2] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.CustomEditorConfigurer#0' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'customPropertyEditorRegistrar' while setting bean property 'propertyEditorRegistrars' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customPropertyEditorRegistrar' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'NamespaceService' while setting bean property 'namespaceService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryDAO' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantService' defined in URL [jar:file:/home/user/apache-tomcat-9.0.37/webapps/alfresco/WEB-INF/lib/alfresco-repository-7.134.1.jar!/alfresco/mt/mt-context.xml]: Cannot resolve reference to bean 'tenantAdminDAO' while setting bean property 'tenantAdminDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminDAO' defined in class path resource [alfresco/dao/dao-context.xml]: Cannot resolve reference to bean 'repoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionTemplate' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'repoSqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionFactory' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'dialectResourceLoader' while setting bean property 'resourceLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectResourceLoader' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot create inner bean 'org.springframework.beans.factory.config.PropertyPathFactoryBean#bbd3974' of type [org.springframework.beans.factory.config.PropertyPathFactoryBean] while setting bean property 'dialectClass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPathFactoryBean#bbd3974' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect': FactoryBean threw exception on object creation; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
os: ubuntu 16.04
JDK 14
tomcat 9
distribution.zip
any help is appreciated!
You did not specify what exactly you set in alfresco-global.properties or what documentation you followed with regards to those settings (in other points you explicitly linked to the documentation pages used for reference). It looks to me like you might not have set the db.driver property (https://docs.alfresco.com/6.2/tasks/postgresql-config.html).
Thanks for the reply!
Heres my alfresco-global properties and i followed this guide https://docs.alfresco.com/community/tasks/configfiles-change-path.html
and https://docs.alfresco.com/6.0/tasks/alf-war-install.html
#
# Set this property unless you have explicitly chosen to expose some repository APIs without authentication
solr.secureComms=https
#
# Custom content and index data location
#
dir.root=/home/user/alfresco-content-services-community-distribution-6.2.0-ga/alf_data
dir.keystore=${dir.root}/keystore
#
# Sample database connection properties
#
db.username=alfresco
db.password=alfresco
#
# Choose DB connection properties for your database, e.g. for PostgreSQL
#
db.driver=org.postgresql.Driver
db.url=jdbcostgresql://localhost:5432/alfresco
#
# URL Generation Parameters (The ${localname} token is replaced by the local server name)
#-------------
alfresco.context=alfresco
alfresco.host=localhost
alfresco.port=8080
alfresco.protocol=http
share.context=share
share.host=localhost
share.port=8080
share.protocol=http
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect': FactoryBean threw exception on object creation; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
It seems the database connection properties in your alfresco-global.properties did not work ,alfresco is still using its'default database connection properties.
it seems /home/user/apache-tomcat-9.0.37/shared/classes is not in the classpath,please check you configured shared.loader correctly
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.