I have successfully deployed both Tomcat and GeoServer. Both are running fine. I want to deploy mapstore.war, but it fails to start and I’m getting the following output from less /opt/tomcat/logs/catalina.out
:
WARN 2024-05-08 12:03:06.268 org.hibernate.orm.deprecation::<init>:60 - HHH020100: The Ehcache second-level cache provider for Hibernate is deprecated. See https://hibernate.atlassian.net/browse/HHH-12441 for details.
INFO 2024-05-08 12:03:06.291 org.hibernate.annotations.common.Version::<clinit>:56 - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
WARN 2024-05-08 12:03:08.152 org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator::initiateService:132 - HHH000342: Could not obtain connection to query metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Error creando archivo "/webapps"
Error while creating file "/webapps" [90062-175])
[...]
INFO 2024-05-08 12:03:08.177 org.hibernate.dialect.Dialect::<init>:175 - HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
WARN 2024-05-08 12:03:08.552 net.sf.ehcache.config.ConfigurationFactory::parseConfiguration:136 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/opt/tomcat/webapps/mapstore/WEB-INF/lib/ehcache-2.10.6.jar!/ehcache-failsafe.xml
WARN 2024-05-08 12:03:10.609 org.hibernate.engine.jdbc.spi.SqlExceptionHelper::logExceptions:137 - SQL Error: 0, SQLState: null
ERROR 2024-05-08 12:03:10.609 org.hibernate.engine.jdbc.spi.SqlExceptionHelper::logExceptions:142 - Cannot create PoolableConnectionFactory (Error creando archivo "/webapps"
Error while creating file "/webapps" [90062-175])
[...]
INFO 2024-05-08 12:03:08.177 org.hibernate.dialect.Dialect::<init>:175 - HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
WARN 2024-05-08 12:03:08.552 net.sf.ehcache.config.ConfigurationFactory::parseConfiguration:136 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/opt/tomcat/webapps/mapstore/WEB-INF/lib/ehcache-2.10.6.jar!/ehcache-failsafe.xml
WARN 2024-05-08 12:03:10.609 org.hibernate.engine.jdbc.spi.SqlExceptionHelper::logExceptions:137 - SQL Error: 0, SQLState: null
ERROR 2024-05-08 12:03:10.609 org.hibernate.engine.jdbc.spi.SqlExceptionHelper::logExceptions:142 - Cannot create PoolableConnectionFactory (Error creando archivo "/webapps"
Error while creating file "/webapps" [90062-175])
ERROR 2024-05-08 12:03:10.617 org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean::buildNativeEntityManagerFactory:426 - Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: geostore] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution
WARN 2024-05-08 12:03:10.619 org.springframework.web.context.support.XmlWebApplicationContext::refresh:591 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geostoreEntityManagerFactory' defined in URL [jar:file:/opt/tomcat/webapps/mapstore/WEB-INF/lib/geostore-persistence-2.0.0.jar!/applicationContext-geostoreDatasource.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: geostore] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution
ERROR 2024-05-08 12:03:10.622 org.springframework.web.context.ContextLoader::initWebApplicationContext:313 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geostoreEntityManagerFactory' defined in URL [jar:file:/opt/tomcat/webapps/mapstore/WEB-INF/lib/geostore-persistence-2.0.0.jar!/applicationContext-geostoreDatasource.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: geostore] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution
I’m using Tomcat 9.0.88, GeoServer 2.23.1 and Java 11 in Ubuntu 22.04 LTS.
That I’m aware of, I haven’t touched any Mapstore/H2/Hibernate/Spring configs.
I was expecting the deployment to go seamlessly and be able to access localhost:8080/mapstore
right away. I tried deploying mapstore.war
from my Windows client in both browser (enabled Tomcat manager app for VPN IP access) and ssh
command line, and from local server (Lubuntu desktop env) in both browser and command line, all with the same result.
I tried re-downloading the war
file, reinstalling both Tomcat and GeoServer from scratch, temporarily giving sudo chmod -R 777 /opt/tomcat
, rebooting, stopping tomcat then copying the war file then rebooting. I keep getting the same error.
To clarify, MapStore does appear in the app list in Tomcat manager app after deployment, but fails to start.