Cuba 7 Problem deployment in jelastic environment

Hello,

Once installed in the Jelastic environment, when my application starts for the first time, I have the following message in the browser: Unexprected error Please contact system administrator
I tried everything but I can not find the origin of the problem. I also tried to change cuba.connectionUrlList … always the same result :frowning:

Thank you for your help !
Stephen

I use the database HSQLDB

build.gradle :

task buildWar(type: CubaWarBuilding) {
    appProperties = ['cuba.automaticDatabaseUpdate': true]
    appHome = '..'
    includeContextXml = true
    coreContextXmlPath = 'modules/core/web/META-INF/war-context.xml'
    includeJdbcDriver = true
    hsqlInProcess = true
    singleWar = false
}
task deployWar(type: CubaJelasticDeploy, dependsOn: buildWar){
    email = 'xxx.yyy@zzz.com'
    password = 'xxx'
    context = 'ROOT'
    environment = 'env-xxxxx'
}

Jelastic Environment :
TOMCAT 8.5.37
JDK 8.0_202
6 cloudlet(s) - 768 MB, 2.4 GHz

build.gradle (5.8 KB)

Your Jelastic Environment Application doesn’t use JAVA 8. From logs:

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-UNNAME

Perhaps, environment uses JAVA 11.

Build your application using JDK 11, not JAVA 8. In that cases WAR contains JAXB libraries.

Hello Andrey,
Sorry, this is an error I was wrong log file … attached, the right file

catalina.out.txt (54.6 KB)

Thanks for your help

Hi,

Jelastic deploy supports only single WAR building (buildWar - CUBA Platform. Developer’s Manual). Try to reconfigure WAR building with single-WAR using CUBA Studio (https://doc.cuba-platform.com/studio/deployment.html).

Thank you Andrey for this return.
I already tried with “Single war”. I have a 404 error message when I go to the link and I do not understand where the problem comes from (LOG)

Buid.gradle :

task buildWar(type: CubaWarBuilding) {
    appProperties = ['cuba.automaticDatabaseUpdate': true]
    appHome = '${app.home}'
    hsqlInProcess = true
    webXmlPath = 'modules/web/web/WEB-INF/single-war-web.xml'
    includeContextXml = true
    coreContextXmlPath = 'modules/core/web/META-INF/war-context.xml'
    includeJdbcDriver = true
}
task deployWar(type: CubaJelasticDeploy, dependsOn: buildWar){
    email = 'xxx.yyy@zzz.com'
    password = 'xxx'
    context = 'ROOT'
    environment = 'env-xxxx'
    hostUrl = 'app.clicketcloud.com'
}

catalina.out.txt (245.3 KB)

Change buildWar task properties:

appHome = '..'
appProperties = ['cuba.automaticDatabaseUpdate' : true, 'cuba.logDir' : '${catalina.base}/logs']

Jelastic deployment documentation isn’t sufficient detailed. We’ll provide further information in the feature.

Hello,
I modified the task properties in the “builWar” section.
catalina.out (2).txt (44.1 KB)

Thank you for your help

Hello, I’m still stuck. I can not find a solution. Can you help me ? thank you

Hi,

I’ve looked at the logs. The problem with DB connection.

Try to remove coreContextXmlPath from buildWar task.

If you run WAR with HSQL, it’s necessary to specify hsqlInProcess = true in order to run embedded HSQL server while deploying WAR file. With coreContextXmlPath property, embedded HSQL isn’t started.

I’ve tried to create sample project and deploy to Jelastic.
My tasks from build.gradle

task jelasticBuildWar(type: CubaWarBuilding) {
    appHome = '..'
    webXmlPath = 'modules/web/web/WEB-INF/single-war-web.xml'
    appProperties = ['cuba.automaticDatabaseUpdate' : true,
'cuba.logDir' : '${catalina.base}/logs']
    includeJdbcDriver = true
    includeContextXml = true
    hsqlInProcess = true
}

task jelasticDeployWar(type: CubaJelasticDeploy, dependsOn: jelasticBuildWar) {
    email = ***
    password = ***
    hostUrl = 'app.mircloud.host'
    environment = 'Tomcat'
}
1 Like

Thanks Andrey, you found the problem! everything works perfectly!