How to run JBoss EAP 6.4 with Java 10
Hello!
Just got a brand new computer with Java 10 and was trying to start my old JBoss EAP 6.4.
But during start up I get:
Caused by: java.lang.NoClassDefFoundError: jdk/internal/reflect/ConstructorAccessorImpl
at java.base/jdk.internal.misc.Unsafe.defineClass0(Native Method) [java.base:]
at java.base/jdk.internal.misc.Unsafe.defineClass(Unsafe.java:1192) [java.base:]
at java.base/jdk.internal.reflect.ClassDefiner.defineClass(ClassDefiner.java:63) [java.base:]
at java.base/jdk.internal.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:400) [java.base:]
at java.base/jdk.internal.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:394) [java.base:]
at java.base/java.security.AccessController.doPrivileged(Native Method) [java.base:]
at java.base/jdk.internal.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:393) [java.base:]
at java.base/jdk.internal.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:92) [java.base:]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:55) [java.base:]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [java.base:]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) [java.base:]
at __redirected.__XMLInputFactory.<init>(__XMLInputFactory.java:115) [jboss-modules.jar:1.3.6.Final-redhat-1]
... 17 more
Caused by: java.lang.ClassNotFoundException: jdk.internal.reflect.ConstructorAccessorImpl from [Module "org.codehaus.woodstox:main" from local module loader @4445629 (finder: local module finder @45b9a632 (roots: /home/fredrik/Applications/jboss-eap-6.4/modules,/home/fredrik/Applications/jboss-eap-6.4/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.6.Final-redhat-1]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.6.Final-redhat-1]
... 29 more
Is there any solution to this?
I guess this is because I used to run my EAP with Java 8 on my old computer and now using Java 10 on my new computer. What do you think guys?
PS I added my complete server.log if that might help
Best regards
Fredrik
Attachments
Responses
Hi Fredrik,
The most easy approach would be to install (in case it isn't already) java-1.8.0-openjdk alongside and use that version
for JBoss EAP 6.4 : sudo yum install java-1.8.0-openjdk ... You can switch between the Java versions with :sudo alternatives --config java - this is valid for RHEL 7 of course, if you're running Windows, it is generally
the same. For how to switch between Java versions there, search the web, you will find many posts about this topic. :)
Regards,
Christian
Hi Fredrik,
Your suspicions are correct: JBoss EAP 6 is not supported on Java 10. The most recent version of the JDK that JBoss EAP 6 is supported to run on is 1.8 (Java 8).
Christian has provided an excellent suggestion to install both JDKs if you require Java 10 for other uses.
You may also want to note that Java 9 and 10 are not 'Long-Term-Support' (LTS) releases of Java: http://www.oracle.com/technetwork/java/javase/eol-135779.html . Java 10 support is due to expire in September 2018.
The next scheduled LTS release of Java after Java 8 will be Java 11.
I hope this helps!
Lucas
Hi Frederik,
I'm not quite sure what you're asking.
If you are asking why Java 10 is not fully backwards compatible: there are many changes that the Java community might change between Java versions that could affect compatibility.
JBoss EAP is only certified and supported on certain versions of a JDK.
Are there any updates to the EAP 6.4 & JRE 10+ question? The response here: https://access.redhat.com/solutions/2953361
Oracle JDK 9 had a 6 month lifecycle and is End of Life (EOL) in March 2018 [1], therefore there are no plans to certify JBoss EAP on JDK 9 which is EOL.
Red Hat is evaluating as Oracle Java's roadmap and version scheme has changed [1] and once JDK 10 / 11 are released we will be able to provide more information.
JRE 10 is nearing its EOL... is the plan to just skip to JRE 11? Some of people won't have the luxury of staying on Java 8.
Hi Marc,
Red Hat will skip Java SE 9 and 10, and ship an OpenJDK distribution based on Java SE 11 (see end of the article). :)
Regards,
Christian
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
