persistence.xml file is missing

Hi
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: java.io.FileNotFoundException: …/app-core/work/persistence.xml (No such file or directory)
at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(AbstractWebAppContextLoader.java:60)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4751)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5175)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150

Thanks

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: https://doc.cuba-platform.com/manual-6.0/build.gradle_buildWar.html

Thanks, it worked

Hi,

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

in this case what should be the appHome absolute path?

Thanks.
Jesman

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