Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
7.0.5, 8.0.0-M1
-
None
-
./catalina.sh version
Using CATALINA_BASE: /opt/tomee705
Using CATALINA_HOME: /opt/tomee705
Using CATALINA_TMPDIR: /opt/tomee705/temp
Using JRE_HOME: /opt/jdk-11
Using CLASSPATH: /opt/tomee705/bin/bootstrap.jar:/opt/tomee705/bin/tomcat-juli.jar
NOTE: 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-UNNAMED
Server version: Apache Tomcat/8.5.32
Server built: Jun 20 2018 19:50:35 UTC
Server number: 8.5.32.0
OS Name: Linux
OS Version: 3.10.0-229.el7.x86_64
Architecture: amd64
JVM Version: 11-ea+21
JVM Vendor: Oracle Corporation
./catalina.sh version Using CATALINA_BASE: /opt/tomee705 Using CATALINA_HOME: /opt/tomee705 Using CATALINA_TMPDIR: /opt/tomee705/temp Using JRE_HOME: /opt/jdk-11 Using CLASSPATH: /opt/tomee705/bin/bootstrap.jar:/opt/tomee705/bin/tomcat-juli.jar NOTE: 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-UNNAMED Server version: Apache Tomcat/8.5.32 Server built: Jun 20 2018 19:50:35 UTC Server number: 8.5.32.0 OS Name: Linux OS Version: 3.10.0-229.el7.x86_64 Architecture: amd64 JVM Version: 11-ea+21 JVM Vendor: Oracle Corporation
Description
Not sure if tomee will support java 11, but with latest java 11 version it is not possible to start tomee:
SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/home]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839) at Criticaljava.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:137) at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:147) at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1563) at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1309) at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125) at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 10 more
Reason is that defineClass is used which is no longer supported with java 11 (at least here, maybe also on other places):
container/openejb-core/src/main/java/org/apache/openejb/util/proxy/LocalBeanProxyFactory.java:
return Unsafe.defineClass(cl, classToProxy, proxyName, proxyBytes);
Same issue has openwebbeans: https://issues.apache.org/jira/browse/OWB-1248