persistence.xml file is missing

I am trying to upload two war file to tomcat server. the app war file is uploaded and running fine, however app-core war file has issues with the following error message. and unable to solve it, Please help if i need to configure the file manually;

java.lang.RuntimeException: java.lang.RuntimeException: …/app-core/work/persistence.xml (No such file or directory)
at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(
at org.apache.catalina.core.StandardContext.listenerStart(
at org.apache.catalina.core.StandardContext.startInternal(
at org.apache.catalina.util.LifecycleBase.start(


Try to specify an absolute path to the app home directory in the buildWar task, for example

task buildWar(type: CubaWarBuilding) {
    appHome = 'c:/work/app_home'
    appProperties = ['cuba.automaticDatabaseUpdate': 'true']
    singleWar = false

See details here:

Thanks, it worked


I am getting the same error when i deploy it in Ubuntu,

in this case what should be the appHome absolute path?


Hi Jesman,

It can be any directory where your application server has full access. See more details here: Application Home - CUBA Platform. Developer’s Manual