Unable to start deployed WAR in Tomcat 8 on Windows 10

After dumping the two WAR files the /app starts but /app-core does not. Experience the same issue on Tomcat 8 & 8.5

Java 1.8.0_121-b13


- 2017-03-22 01:09:12.843 INFO  [http-nio-8080-exec-10] com.haulmont.cuba.core.sys.AppContextLoader - DbmsType of the main database is set to postgres
2017-03-22 01:09:12.935 INFO  [http-nio-8080-exec-10] com.haulmont.cuba.core.sys.persistence.PersistenceConfigProcessor - Creating file C:\Program Files\Apache Software Foundation\Tomcat 8.0\${app.home}\app-core\work\persistence.xml
2017-03-22 01:09:13.061 INFO  [http-nio-8080-exec-10] com.haulmont.cuba.core.sys.CubaCoreApplicationContext - Refreshing com.haulmont.cuba.core.sys.CubaCoreApplicationContext@6ac848b4: startup date [Wed Mar 22 01:09:13 WAST 2017]; root of context hierarchy
2017-03-22 01:09:13.990 WARN  [http-nio-8080-exec-10] com.haulmont.cuba.core.sys.CubaCoreApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'entityManagerFactory' defined in class path resource [cuba-spring.xml]: Could not resolve placeholder 'app.home' in string value "${app.home}/app-core/work"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'app.home' in string value "${app.home}/app-core/work"
2017-03-22 01:09:14.001 ERROR [http-nio-8080-exec-10] com.haulmont.cuba.core.sys.AppContextLoader - Error initializing application
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'entityManagerFactory' defined in class path resource [cuba-spring.xml]: Could not resolve placeholder 'app.home' in string value "${app.home}/app-core/work"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'app.home' in string value "${app.home}/app-core/work"

Hi,

I have tried to reproduce the problem, but in my environment, everything works well.

Have you specified custom cuba.dataDir for your project (in app.properties or in local.app.properties in Tomcat)?

Which value has the -Dcatalina.home Java Option?

Assumably the issue is there as the path to persistence.xml is built from those values.

We have got a manual for deployment in Tomcat on Windows: WAR deployment to Tomcat Windows Service - CUBA Platform. Developer’s Manual. Please try to deploy your application exactly as written.

Thanks Rostislav,

I found my mistake.

I had

appHome = '${app.home}'

in my buildWar task, instead of

appHome = './app_home'

Thanks for your help, I started me in the right direction.