FlowUI project deployment testing
I have tried to deploy my project to an external server instead of my development server and it is failed. My application was running in 1.4 in a remote server but the file size was unexpectedly huge over 600MB. Now the same project war file is only about 110BM but it’s no more running on the remote server. Let me explain what is happening:
Development server setup
My IDE is running in my local computer but I am using the MS SQL server in a remote server using a public IP, for example, IP address e.g. 43.111.11.11
The application name is “test” and database name is “testdb”
The data source name in (JNDI) is as follows and the mainApplication file is updated as suggested in the user manual (as you can see as attached):
DataSource dataSource = lookup.getDataSource("java:comp/env/jdbc/testdb");
I have built the war file for ‘prod’ using the following command:
./gradlew -Pvaadin.productionMode=true bootWar
Server deployment configuration
This server is the same remote server that my database is located I accessed in development environment using the IP address (e.g. 43.111.11.11). That means, when deployed, the war file should read from localhost instead of through that public IP. Note that my CUBA application is running here which indicates that tomcat is Ok.
Here is my context file that I have saved in the folder Tomcat9/conf/Catalina/localhost/
Also created tomcat/bin/setenv.sh
file with the following content:
CATALINA_OPTS="-Dspring.profiles.active=prod"
The war file (test.war) is then deployed, no!! not working.
here is the log file extract from tomcat
03-Mar-2023 11:49:35.812 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.44]
03-Mar-2023 11:49:35.843 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\Catalina\localhost\test.xml]
03-Mar-2023 11:49:47.155 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
03-Mar-2023 11:49:47.421 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
03-Mar-2023 11:49:47.437 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/test] startup failed due to previous errors
03-Mar-2023 11:49:47.515 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\Catalina\localhost\test.xml] has finished in [11,672] ms
03-Mar-2023 11:49:47.515 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\docs]
03-Mar-2023 11:49:47.562 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\docs] has finished in [47] ms
03-Mar-2023 11:49:47.562 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\manager]
03-Mar-2023 11:49:47.624 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\manager] has finished in [62] ms
03-Mar-2023 11:49:47.640 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\ROOT]
03-Mar-2023 11:49:47.655 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\ROOT] has finished in [15] ms
03-Mar-2023 11:49:47.671 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
03-Mar-2023 11:49:47.687 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [11951] milliseconds
03-Mar-2023 11:53:05.141 INFO [Thread-4] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
03-Mar-2023 11:53:05.165 INFO [Thread-4] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
03-Mar-2023 11:53:05.196 INFO [Thread-4] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
03-Mar-2023 11:53:05.212 INFO [Thread-4] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
2023-03-03 11:53:06 Apache Commons Daemon procrun stderr initialized.
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.44
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Mar 4 2021 21:49:34 UTC
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.44.0
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows Server 2016
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\AdoptOpenJDK\jdk-11
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.10+9
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: AdoptOpenJDK
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 9.0
03-Mar-2023 11:53:07.602 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 9.0
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: abort
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms128m
03-Mar-2023 11:53:07.618 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx4096m
03-Mar-2023 11:53:07.634 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\AdoptOpenJDK\jdk-11\bin;C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\ESET\ESET Security\;C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\WindowsApps;.]
03-Mar-2023 11:53:08.212 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
03-Mar-2023 11:53:08.352 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1087] milliseconds
03-Mar-2023 11:53:08.446 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
03-Mar-2023 11:53:08.446 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.44]
03-Mar-2023 11:53:08.493 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\Catalina\localhost\test.xml]
03-Mar-2023 11:53:20.056 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
03-Mar-2023 11:53:20.306 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
03-Mar-2023 11:53:20.337 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/test] startup failed due to previous errors
03-Mar-2023 11:53:20.399 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\Catalina\localhost\test.xml] has finished in [11,906] ms
03-Mar-2023 11:53:20.399 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\docs]
03-Mar-2023 11:53:20.446 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\docs] has finished in [47] ms
03-Mar-2023 11:53:20.446 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\manager]
03-Mar-2023 11:53:20.509 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\manager] has finished in [63] ms
03-Mar-2023 11:53:20.509 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\ROOT]
03-Mar-2023 11:53:20.540 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\ROOT] has finished in [31] ms
03-Mar-2023 11:53:20.540 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
03-Mar-2023 11:53:20.556 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [12198] milliseconds
note that, my development environment is using jdk17 whereas the server has jdk11, can this be an issue?
I have attached the test project, in case you need it. Thank you in advance for your help.
test.zip (384.3 KB)