Skip to content
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

[Bug Report]Cant enable plugin. Jetty lib related? #161

Closed
alyx404 opened this issue May 31, 2022 · 3 comments
Closed

[Bug Report]Cant enable plugin. Jetty lib related? #161

alyx404 opened this issue May 31, 2022 · 3 comments

Comments

@alyx404
Copy link

alyx404 commented May 31, 2022

Using IBM Semeru Runtime (OpenJ9)

$ ./java -version
openjdk version "1.8.0_332"
IBM Semeru Runtime Open Edition (build 1.8.0_332-b09)
Eclipse OpenJ9 VM (build openj9-0.32.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20220422_370 (JIT enabled, AOT enabled)
OpenJ9   - 9a84ec34e
OMR      - ab24b6666
JCL      - 0b8b8af39a based on jdk8u332-b09)

logs below

[17:31:13] [Server thread/INFO] [de.sldk.mc.PrometheusExporter]: [PrometheusExporter] Enabling PrometheusExporter v2.5.0
[17:31:14] [Server thread/ERROR] [Minecraft]: Error occurred while enabling PrometheusExporter v2.5.0 (Is it up to date?)
java.lang.NoClassDefFoundError: org.eclipse.jetty.server.Handler
	at de.sldk.mc.PrometheusExporter.startMetricsServer(PrometheusExporter.java:27) ~[?:?]
	at de.sldk.mc.PrometheusExporter.onEnable(PrometheusExporter.java:20) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[forge:?]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[forge:?]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[forge:?]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:411) ~[forge:1.16.5-6ca86dd2]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:322) ~[forge:1.16.5-6ca86dd2]
	at net.minecraft.server.MinecraftServer.func_240787_a_(MinecraftServer.java:439) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240800_l__(MinecraftServer.java:345) ~[?:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:218) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:737) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:265) ~[?:?]
	at java.lang.Thread.run(Thread.java:832) [?:1.8.0_332]
Caused by: java.lang.ClassNotFoundException: Failed to remap class org.eclipse.jetty.server.Handler
	at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:261) ~[forge:?]
	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[forge:?]
	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:124) ~[forge:?]
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:954) ~[?:1.8.0_332]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:899) ~[?:1.8.0_332]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:882) ~[?:1.8.0_332]
	... 13 more
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/eclipse/jetty/server/Handler, offset=6
	at java.lang.ClassLoader.defineClassImpl(Native Method) ~[?:1.8.0_332]
	at java.lang.ClassLoader.defineClassInternal(ClassLoader.java:397) ~[?:1.8.0_332]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:358) ~[?:1.8.0_332]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_332]
	at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:253) ~[forge:?]
	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[forge:?]
	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:124) ~[forge:?]
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:954) ~[?:1.8.0_332]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:899) ~[?:1.8.0_332]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:882) ~[?:1.8.0_332]
	... 13 more
@alyx404 alyx404 changed the title [Bug Report]Cant enable plugin. Old jetty lib? [Bug Report]Cant enable plugin. Jetty lib related? May 31, 2022
@alyx404
Copy link
Author

alyx404 commented May 31, 2022

Windows 11 Build 25126.1000
Eclipse Temurin OpenJDK 8u332b09
logs below

[19:21:47] [Server thread/ERROR]: Error occurred while enabling PrometheusExporter v2.5.1-SNAPSHOT (Is it up to date?)
 java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Handler
        at de.sldk.mc.PrometheusExporter.startMetricsServer(PrometheusExporter.java:27) ~[?:?]
        at de.sldk.mc.PrometheusExporter.onEnable(PrometheusExporter.java:20) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[forge:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[forge:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[forge:?]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:411) ~[forge:1.16.5-6ca86dd2]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:322) ~[forge:1.16.5-6ca86dd2]
        at net.minecraft.server.MinecraftServer.func_240787_a_(MinecraftServer.java:439) ~[?:?]
        at net.minecraft.server.MinecraftServer.func_240800_l__(MinecraftServer.java:345) ~[?:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:218) ~[?:?]
        at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:737) ~[?:?]
        at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:265) ~[?:?]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_332]
Caused by: java.lang.ClassNotFoundException: Failed to remap class org.eclipse.jetty.server.Handler
        at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:261) ~[forge:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[forge:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:124) ~[forge:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_332]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_332]
        ... 13 more
Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/server/Handler 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) ~[?:1.8.0_332]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_332]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_332]
        at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:253) ~[forge:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[forge:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:124) ~[forge:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_332]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_332]
        ... 13 more

@sladkoff
Copy link
Owner

sladkoff commented May 31, 2022

@Borealis404 Apparently, the latest version of this plugin is not compatible with Java 8 due to Jetty 11.

image

Source


You need a version with Jetty 9 to run it on Java 8. The last version of this plugin with that version should be 2.3.0.

In case you're wondering, Jetty 9 Community support ends tomorrow, 2022-06-01.

Also, Java 8 Active support has ended 2022-03-31.

I'm surprised that nobody has raised this before.

Either way I'm leaning towards "ignoring" this. If you need JVM 8 support, use the old plugin version or upgrade your JVM.

@alyx404
Copy link
Author

alyx404 commented Jun 2, 2022

Using Java 11 for my 1.16.5 forge server now.
Apparently working.Thanks!
btw Java8 LTS still have security updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants