Hello,
I’m using java version “1.8.0_121”, Apache Tomcat 8.5, and cuba studio v6.4.3.
If I run the application using the (Re)start application all works fine, the application deploys and runs successfully, but when I build the WAR files for distribution and deploy them to the production server (Using also Tomcat 8.5 with java 1.8.0_121) I get several severe exceptions.
I am using the following task to build the WAR files as suggested in the documentation:
groovy
task buildWar(type: CubaWarBuilding) {
singleWar = false
appHome = '.'
appProperties = ['cuba.automaticDatabaseUpdate' : true]
includeJdbcDriver = true
}
And this is the stacktrace that is printed when the app.war is being deployed:
14-Apr-2017 21:13:07.722 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
14-Apr-2017 21:13:07.824 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/app-core] startup failed due to previous errors
14-Apr-2017 21:13:07.840 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\app-core.war has finished in 8,667 ms
14-Apr-2017 21:13:07.844 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\app.war
14-Apr-2017 21:13:17.386 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/app]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsupportedClassVersionError: com/haulmont/restapi/sys/CubaRestApiServlet : Unsupported major.minor version 52.0 (unable to load class com.haulmont.restapi.sys.CubaRestApiServlet)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2271)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:811)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1254)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at org.atmosphere.util.IOUtils.isAtmosphere(IOUtils.java:348)
at org.atmosphere.cpr.AtmosphereInitializer.onStartup(AtmosphereInitializer.java:66)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5178)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Any idea how can I troubleshoot and fix this error?
Thank you in advance!