Hi,
try to install Alfresco WARs on Debian 10 without success. Maybe someone has an idea?
Copy and restart tomcat.
/var/lib/tomcat9/webapps/alfresco.war
/var/lib/tomcat9/webapps/share.war
Remove alfresco.war and share.war after deployed.
root@dmstest:/usr/share/tomcat9# ls -l /var/lib/tomcat9/webapps/
insgesamt 12
drwxr-x--- 10 tomcat tomcat 4096 Jul 14 12:40 alfresco
drwxr-xr-x 3 root root 4096 Jul 13 13:49 ROOT
drwxr-x--- 14 tomcat tomcat 4096 Jul 14 12:41 share
mkdir -p /usr/share/tomcat9/shared/classes/
touch /usr/share/tomcat9/shared/classes/alfresco-global.properties
cp -v /usr/share/java/mariadb-java-client.jar /var/lib/tomcat9/webapps/alfresco/WEB-INF/lib
chown tomcat:tomcat /var/lib/tomcat9/webapps/alfresco/WEB-INF/lib/mariadb-java-client.jar
HTTP Status 404 – Not Found Type Status Report Message /alfresco Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/9.0.31 (Debian)
# # 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=/var/lib/alfresco/data dir.keystore=${dir.root}/keystore # # Sample database connection properties # db.name=alfresco db.username=alfresco db.password=alfresco #db.host=localhost #db.port=3306 #db.pool.max=275 # # Choose DB connection properties for your database, e.g. for PostgreSQL # db.driver=org.postgresql.Driver db.url=jdbc:postgresql://localhost:5432/alfresco #db.driver=com.mysql.jdbc.Driver #db.url=jdbc:mariadb://${db.host}:${db.port}/${db.name}?useUnicode=yes&characterEncoding=UTF-8 # # URL Generation Parameters (The ${localname} token is replaced by the local server name) #------------- alfresco.context=alfresco alfresco.host=${localname} alfresco.port=8080 alfresco.protocol=http share.context=share share.host=${localname} share.port=8080 share.protocol=http user.name.caseSensitive=false domain.name.caseSensitive=false #domain.separator=
Logfile Tomcat:
[2020-07-15 11:16:57] [info] NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED [2020-07-15 11:16:57] [info] Server version name: Apache Tomcat/9.0.31 (Debian) [2020-07-15 11:16:57] [info] Server built: Apr 25 2020 12:24:56 UTC [2020-07-15 11:16:57] [info] Server version number: 9.0.31.0 [2020-07-15 11:16:57] [info] OS Name: Linux [2020-07-15 11:16:57] [info] OS Version: 4.19.0-9-amd64 [2020-07-15 11:16:57] [info] Architecture: amd64 [2020-07-15 11:16:57] [info] Java Home: /usr/lib/jvm/java-11-openjdk-amd64 [2020-07-15 11:16:57] [info] JVM Version: 11.0.7+10-post-Debian-3deb10u1 [2020-07-15 11:16:57] [info] JVM Vendor: Debian [2020-07-15 11:16:57] [info] CATALINA_BASE: /var/lib/tomcat9 [2020-07-15 11:16:57] [info] CATALINA_HOME: /usr/share/tomcat9 [2020-07-15 11:16:57] [info] Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED [2020-07-15 11:16:57] [info] Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED [2020-07-15 11:16:57] [info] Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED [2020-07-15 11:16:57] [info] Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties [2020-07-15 11:16:57] [info] Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager [2020-07-15 11:16:57] [info] Command line argument: -Djava.awt.headless=true [2020-07-15 11:16:57] [info] Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 [2020-07-15 11:16:57] [info] Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources [2020-07-15 11:16:57] [info] Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 [2020-07-15 11:16:57] [info] Command line argument: -Dignore.endorsed.dirs= [2020-07-15 11:16:57] [info] Command line argument: -Dcatalina.base=/var/lib/tomcat9 [2020-07-15 11:16:57] [info] Command line argument: -Dcatalina.home=/usr/share/tomcat9 [2020-07-15 11:16:57] [info] Command line argument: -Djava.io.tmpdir=/tmp [2020-07-15 11:16:57] [info] An older version [1.2.21] of the APR based Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.2.23] [2020-07-15 11:16:57] [info] Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. [2020-07-15 11:16:57] [info] APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. [2020-07-15 11:16:57] [info] APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] [2020-07-15 11:16:57] [info] OpenSSL successfully initialized [OpenSSL 1.1.1d 10 Sep 2019] [2020-07-15 11:16:58] [info] Initializing ProtocolHandler ["http-nio-8080"] [2020-07-15 11:16:58] [info] Server initialization in [822] milliseconds [2020-07-15 11:16:58] [info] Starting service [Catalina] [2020-07-15 11:16:58] [info] Starting Servlet engine: [Apache Tomcat/9.0.31 (Debian)] [2020-07-15 11:16:58] [info] Deploying web application directory [/var/lib/tomcat9/webapps/alfresco] [2020-07-15 11:16:59] [info] log4j:ERROR setFile(null,true) call failed. [2020-07-15 11:16:59] [info] java.io.FileNotFoundException: alfresco.log (Das Dateisystem ist nur lesbar)
[2020-07-15 11:16:59] [info] log4j:ERROR Either File or DatePattern options are not set for appender [File]. [2020-07-15 11:17:07] [info] Juli 15, 2020 11:17:07 VORM. org.apache.jasper.servlet.TldScanner scanJars [2020-07-15 11:17:07] [info] INFORMATION: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. [2020-07-15 11:17:07] [info] Juli 15, 2020 11:17:07 VORM. org.apache.catalina.core.ApplicationContext log [2020-07-15 11:17:07] [info] INFORMATION: No Spring WebApplicationInitializer types detected on classpath [2020-07-15 11:17:07] [info] Juli 15, 2020 11:17:07 VORM. org.apache.catalina.core.ApplicationContext log [2020-07-15 11:17:07] [info] INFORMATION: Initializing Spring root WebApplicationContext [2020-07-15 11:17:11] [info] Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver' [2020-07-15 11:17:11] [info] java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
[2020-07-15 11:17:11] [info] #011at org.springframework.beans.factory.support.AbstractAutowireCapableBe2020-07-15 11:17:11,881 WARN [context.support.XmlWebApplicationContext] [main] 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:/var/lib/tomcat9/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#4808fefe' 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#4808fefe' 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' [2020-07-15 11:17:11] [info] 2020-07-15 11:17:11,895 ERROR [web.context.ContextLoader] [main] Context initialization failed
Solved! Go to Solution.
Thank you, this was the problem!
I have no idea why tomcat does not accept the alfresco-global.properties file in /var/lib/tomcat9/shared/classes/
[2020-07-13 13:49:08] [info] CATALINA_BASE: /var/lib/tomcat9 [2020-07-13 13:49:08] [info] CATALINA_HOME: /usr/share/tomcat9
/etc/tomcat9/catalina.properties
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
Here it work:
/var/lib/tomcat9/webapps/alfresco/WEB-INF/classes/alfresco-global.properties
Your Tomcat configuration does not allow for alfresco-global.properties to be picked up. As a result, Alfresco still tries to use the MySQL DB driver that is configured by default. You need to configure your Tomcat server in a way that alfresco-global.properties is accessible from the Alfresco web applications classpath.
Thank you, this was the problem!
I have no idea why tomcat does not accept the alfresco-global.properties file in /var/lib/tomcat9/shared/classes/
[2020-07-13 13:49:08] [info] CATALINA_BASE: /var/lib/tomcat9 [2020-07-13 13:49:08] [info] CATALINA_HOME: /usr/share/tomcat9
/etc/tomcat9/catalina.properties
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
Here it work:
/var/lib/tomcat9/webapps/alfresco/WEB-INF/classes/alfresco-global.properties
Hi @samuelw,
Great news that you've now got it working - thanks too for accepting the solution, really helpful for other users.
Take care,
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.