Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK 8 compatibility to compile metric-core module (4.2.x) #2707

Closed
mcfongtw opened this issue Jul 3, 2022 · 1 comment
Closed

JDK 8 compatibility to compile metric-core module (4.2.x) #2707

mcfongtw opened this issue Jul 3, 2022 · 1 comment

Comments

@mcfongtw
Copy link

mcfongtw commented Jul 3, 2022

When I attempt to compile metric-core on the latest release/4.2.x with JDK 1.8.312, maven complains the following error. Is the project no longer compatible with Java 8 and need to move forward to Java 9/11?

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] An exception has occurred in the compiler (1.8.0_312). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.UnsupportedClassVersionError: com/google/errorprone/ErrorProneJavacPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at com.sun.tools.javac.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:255)
	at com.sun.tools.javac.util.ServiceLoader$1.next(ServiceLoader.java:337)
	at com.sun.tools.javac.main.Main.compile(Main.java:463)
	at com.sun.tools.javac.main.Main.compile(Main.java:381)
	at com.sun.tools.javac.main.Main.compile(Main.java:370)
	at com.sun.tools.javac.main.Main.compile(Main.java:361)
	at com.sun.tools.javac.Main.compile(Main.java:56)
	at com.sun.tools.javac.Main.main(Main.java:42)

[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.788 s
[INFO] Finished at: 2022-07-02T21:51:27-07:00
[INFO] ------------------------------------------------------------------------
@joschi
Copy link
Member

joschi commented Jul 3, 2022

@mcfongtw You need Java 11 to compile Dropwizard Metrics 4.2.x (because of Error Prone since Error Prone 2.11.0 and Dropwizard Metrics 4.2.9 #2419) but can still use it with Java 8.

@dropwizard dropwizard locked and limited conversation to collaborators Jul 3, 2022
@joschi joschi converted this issue into discussion #2708 Jul 3, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants