How to run JBoss EAP 6.4 with Java 10

Latest response

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

Hello Guys! Thanks for solution and the info! Have I missed something, is it impossible with some extra-add-ons-backwards-compatible.jars for java 10? Is there some reason for not make java 10 fully backward compatible? Best regards Fredrik

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.

Hello Lucas, my question might have been a bit uncleared. I guess there is a reason that the Java community have removed some classes. I just do not understand why. But I also think that question should be asked in the Java community. Sorry for confusing you. Best regards Fredrik

No problem, Fredrik! :)

Btw I have tried to post response from my android phone both firefox and chrome, but the form does not seem to accept my submit. Have you experience that?

Fredrik, are you encountering any particular error messages?

Thanks for letting us know about this, Fredrik. I will forward your report to the right person.

Hello Guys! Sorry for late response, now sitting at my computer. When I try to post a response from my Android 8, Chrome the Post Response button does not respond. I do not get any error message. I can get the button to get some kind of focus when tapping the textarea and the button, back and forth. There is some small yellow frame around the button when it get focus. How ever, it do not respond and submit the form. I took a screendump: https://pasteboard.co/HxBa6ht.png But I do not think it says so much. Best regards Fredrik

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

Thanks. Have there been any announcements of when EAP 6.4 will be patched to make it compliant with Java SE 11? I ask because I got the same error on my server when I tried to upgrade to Java 10 which implies that there are incompatibilities between the two.

Hi Marc, as of now (today), I haven't seen an official announcement from Red Hat about this topic. :)

Regards,
Christian

How does JBoss EAP will support JDK 11? I am tasked with up gradation of application from JDK 6 to JDK 11. I need to know how to use JBoss with JDK 11. What will be the impact or major issues on application configuration ?

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.