From 339d368dffe87a260f8c514593f7d0c73d1a436b Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Thu, 4 Jul 2024 12:26:51 +0200 Subject: [PATCH 1/3] Add logs for unsupported class version error in 1.20.4 --- ...gin-unsupported-class-version-1-16-5.json} | 0 ...ugin-unsupported-class-version-1-16-5.log} | 0 ...ugin-unsupported-class-version-1-20-4.json | 681 ++++++++++++++++++ ...lugin-unsupported-class-version-1-20-4.log | 65 ++ 4 files changed, 746 insertions(+) rename test/data/Vanilla/Bukkit/Paper/{paper-plugin-unsupported-class-version.json => paper-plugin-unsupported-class-version-1-16-5.json} (100%) rename test/data/Vanilla/Bukkit/Paper/{paper-plugin-unsupported-class-version.log => paper-plugin-unsupported-class-version-1-16-5.log} (100%) create mode 100644 test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.json create mode 100644 test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.log diff --git a/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version.json b/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-16-5.json similarity index 100% rename from test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version.json rename to test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-16-5.json diff --git a/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version.log b/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-16-5.log similarity index 100% rename from test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version.log rename to test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-16-5.log diff --git a/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.json b/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.json new file mode 100644 index 0000000..313fb70 --- /dev/null +++ b/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.json @@ -0,0 +1,681 @@ +{ + "id": "paper\/server", + "name": "Paper", + "type": "Server Log", + "version": "1.20.4", + "title": "Paper 1.20.4 Server Log", + "entries": [ + { + "level": 6, + "time": null, + "prefix": "[16:52:44] [ServerMain\/INFO]:", + "lines": [ + { + "number": 1, + "content": "[16:52:44] [ServerMain\/INFO]: Environment: Environment[sessionHost=https:\/\/sessionserver.mojang.com, servicesHost=https:\/\/api.minecraftservices.com, name=PROD]" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:44] [ServerMain\/INFO]:", + "lines": [ + { + "number": 2, + "content": "[16:52:44] [ServerMain\/INFO]: Found new data pack file\/bukkit, loading it automatically" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:44] [ServerMain\/INFO]:", + "lines": [ + { + "number": 3, + "content": "[16:52:44] [ServerMain\/INFO]: No existing world data, creating new world" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:45] [ServerMain\/INFO]:", + "lines": [ + { + "number": 4, + "content": "[16:52:45] [ServerMain\/INFO]: Loaded 1174 recipes" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:45] [ServerMain\/INFO]:", + "lines": [ + { + "number": 5, + "content": "[16:52:45] [ServerMain\/INFO]: Loaded 1271 advancements" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:45] [Server thread\/INFO]:", + "lines": [ + { + "number": 6, + "content": "[16:52:45] [Server thread\/INFO]: Starting minecraft server version 1.20.4" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:45] [Server thread\/INFO]:", + "lines": [ + { + "number": 7, + "content": "[16:52:45] [Server thread\/INFO]: Loading properties" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:45] [Server thread\/INFO]:", + "lines": [ + { + "number": 8, + "content": "[16:52:45] [Server thread\/INFO]: This server is running Paper version git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver\/1.20.4)" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 9, + "content": "[16:52:46] [Server thread\/INFO]: Server Ping Player Sample Count: 12" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 10, + "content": "[16:52:46] [Server thread\/INFO]: Using 4 threads for Netty based IO" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 11, + "content": "[16:52:46] [Server thread\/INFO]: [ChunkTaskScheduler] Chunk system is using 1 I\/O threads, 1 worker threads, and gen parallelism of 1 threads" + } + ] + }, + { + "level": 4, + "time": null, + "prefix": "[16:52:46] [Server thread\/WARN]:", + "lines": [ + { + "number": 12, + "content": "[16:52:46] [Server thread\/WARN]: [!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future." + }, + { + "number": 13, + "content": " We recommend installing the spark profiler as a replacement: https:\/\/spark.lucko.me\/" + }, + { + "number": 14, + "content": " For more information please visit: https:\/\/github.com\/PaperMC\/Paper\/issues\/8948" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 15, + "content": "[16:52:46] [Server thread\/INFO]: Default game type: SURVIVAL" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 16, + "content": "[16:52:46] [Server thread\/INFO]: Generating keypair" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 17, + "content": "[16:52:46] [Server thread\/INFO]: Starting Minecraft server on *:49877" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 18, + "content": "[16:52:46] [Server thread\/INFO]: Using epoll channel type" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 19, + "content": "[16:52:46] [Server thread\/INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 20, + "content": "[16:52:46] [Server thread\/INFO]: Paper: Using OpenSSL 3.0.x (Linux x86_64) cipher from Velocity." + } + ] + }, + { + "level": 3, + "time": null, + "prefix": "[16:52:46] [Server thread\/ERROR]:", + "lines": [ + { + "number": 21, + "content": "[16:52:46] [Server thread\/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'worldedit-bukkit-7.3.4-beta-01.jar' in folder 'plugins'" + }, + { + "number": 22, + "content": "org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com\/sk89q\/worldedit\/bukkit\/WorldEditPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0" + }, + { + "number": 23, + "content": "\tat io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:127) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 24, + "content": "\tat io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 25, + "content": "\tat io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 26, + "content": "\tat io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:38) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 27, + "content": "\tat io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 28, + "content": "\tat org.bukkit.craftbukkit.v1_20_R3.CraftServer.loadPlugins(CraftServer.java:507) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 29, + "content": "\tat net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 30, + "content": "\tat net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 31, + "content": "\tat net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 32, + "content": "\tat java.lang.Thread.run(Thread.java:840) ~[?:?]" + }, + { + "number": 33, + "content": "Caused by: java.lang.UnsupportedClassVersionError: com\/sk89q\/worldedit\/bukkit\/WorldEditPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0" + }, + { + "number": 34, + "content": "\tat java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]" + }, + { + "number": 35, + "content": "\tat java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]" + }, + { + "number": 36, + "content": "\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]" + }, + { + "number": 37, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:243) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 38, + "content": "\tat java.lang.ClassLoader.loadClass(ClassLoader.java:592) ~[?:?]" + }, + { + "number": 39, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:169) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 40, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 41, + "content": "\tat java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]" + }, + { + "number": 42, + "content": "\tat java.lang.Class.forName0(Native Method) ~[?:?]" + }, + { + "number": 43, + "content": "\tat java.lang.Class.forName(Class.java:467) ~[?:?]" + }, + { + "number": 44, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:78) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 45, + "content": "\tat io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:123) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 46, + "content": "\t... 9 more" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:46] [Server thread\/INFO]:", + "lines": [ + { + "number": 47, + "content": "[16:52:46] [Server thread\/INFO]: Preparing level \"world\"" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 48, + "content": "[16:52:56] [Server thread\/INFO]: Preparing start region for dimension minecraft:overworld" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 49, + "content": "[16:52:56] [Server thread\/INFO]: Time elapsed: 118 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 50, + "content": "[16:52:56] [Server thread\/INFO]: Preparing start region for dimension minecraft:the_nether" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 51, + "content": "[16:52:56] [Server thread\/INFO]: Time elapsed: 65 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 52, + "content": "[16:52:56] [Server thread\/INFO]: Preparing start region for dimension minecraft:the_end" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 53, + "content": "[16:52:56] [Server thread\/INFO]: Time elapsed: 80 ms" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 54, + "content": "[16:52:56] [Server thread\/INFO]: Starting GS4 status listener" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 55, + "content": "[16:52:56] [Server thread\/INFO]: Thread Query Listener started" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Query Listener #1\/INFO]:", + "lines": [ + { + "number": 56, + "content": "[16:52:56] [Query Listener #1\/INFO]: Query running on 0.0.0.0:9898" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 57, + "content": "[16:52:56] [Server thread\/INFO]: JMX monitoring enabled" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 58, + "content": "[16:52:56] [Server thread\/INFO]: Running delayed init tasks" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 59, + "content": "[16:52:56] [Server thread\/INFO]: Done (10.766s)! For help, type \"help\"" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 60, + "content": "[16:52:56] [Server thread\/INFO]: *************************************************************************************" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 61, + "content": "[16:52:56] [Server thread\/INFO]: This is the first time you're starting this server." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 62, + "content": "[16:52:56] [Server thread\/INFO]: It's recommended you read our 'Getting Started' documentation for guidance." + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 63, + "content": "[16:52:56] [Server thread\/INFO]: View this and more helpful information here: https:\/\/docs.papermc.io\/paper\/next-steps" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 64, + "content": "[16:52:56] [Server thread\/INFO]: *************************************************************************************" + } + ] + }, + { + "level": 6, + "time": null, + "prefix": "[16:52:56] [Server thread\/INFO]:", + "lines": [ + { + "number": 65, + "content": "[16:52:56] [Server thread\/INFO]: Timings Reset" + } + ] + } + ], + "analysis": { + "problems": [ + { + "message": "The plugin 'worldedit-bukkit-7.3.4-beta-01' requires Java version 21 or later to run.", + "counter": 1, + "entry": { + "level": 3, + "time": null, + "prefix": "[16:52:46] [Server thread\/ERROR]:", + "lines": [ + { + "number": 21, + "content": "[16:52:46] [Server thread\/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'worldedit-bukkit-7.3.4-beta-01.jar' in folder 'plugins'" + }, + { + "number": 22, + "content": "org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com\/sk89q\/worldedit\/bukkit\/WorldEditPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0" + }, + { + "number": 23, + "content": "\tat io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:127) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 24, + "content": "\tat io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 25, + "content": "\tat io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 26, + "content": "\tat io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:38) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 27, + "content": "\tat io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 28, + "content": "\tat org.bukkit.craftbukkit.v1_20_R3.CraftServer.loadPlugins(CraftServer.java:507) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 29, + "content": "\tat net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 30, + "content": "\tat net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 31, + "content": "\tat net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 32, + "content": "\tat java.lang.Thread.run(Thread.java:840) ~[?:?]" + }, + { + "number": 33, + "content": "Caused by: java.lang.UnsupportedClassVersionError: com\/sk89q\/worldedit\/bukkit\/WorldEditPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0" + }, + { + "number": 34, + "content": "\tat java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]" + }, + { + "number": 35, + "content": "\tat java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]" + }, + { + "number": 36, + "content": "\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]" + }, + { + "number": 37, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:243) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 38, + "content": "\tat java.lang.ClassLoader.loadClass(ClassLoader.java:592) ~[?:?]" + }, + { + "number": 39, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:169) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 40, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 41, + "content": "\tat java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]" + }, + { + "number": 42, + "content": "\tat java.lang.Class.forName0(Native Method) ~[?:?]" + }, + { + "number": 43, + "content": "\tat java.lang.Class.forName(Class.java:467) ~[?:?]" + }, + { + "number": 44, + "content": "\tat org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:78) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]" + }, + { + "number": 45, + "content": "\tat io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:123) ~[paper-1.20.4.jar:git-Paper-497]" + }, + { + "number": 46, + "content": "\t... 9 more" + } + ] + }, + "solutions": [ + { + "message": "Delete the file 'plugins\/worldedit-bukkit-7.3.4-beta-01.jar'." + }, + { + "message": "Change your Java version to 21 or later." + } + ] + } + ], + "information": [ + { + "message": "Minecraft version: 1.20.4", + "counter": 1, + "entry": { + "level": 6, + "time": null, + "prefix": "[16:52:45] [Server thread\/INFO]:", + "lines": [ + { + "number": 6, + "content": "[16:52:45] [Server thread\/INFO]: Starting minecraft server version 1.20.4" + } + ] + }, + "label": "Minecraft version", + "value": "1.20.4" + } + ] + } +} \ No newline at end of file diff --git a/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.log b/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.log new file mode 100644 index 0000000..30cc3d6 --- /dev/null +++ b/test/data/Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.log @@ -0,0 +1,65 @@ +[16:52:44] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD] +[16:52:44] [ServerMain/INFO]: Found new data pack file/bukkit, loading it automatically +[16:52:44] [ServerMain/INFO]: No existing world data, creating new world +[16:52:45] [ServerMain/INFO]: Loaded 1174 recipes +[16:52:45] [ServerMain/INFO]: Loaded 1271 advancements +[16:52:45] [Server thread/INFO]: Starting minecraft server version 1.20.4 +[16:52:45] [Server thread/INFO]: Loading properties +[16:52:45] [Server thread/INFO]: This server is running Paper version git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver/1.20.4) +[16:52:46] [Server thread/INFO]: Server Ping Player Sample Count: 12 +[16:52:46] [Server thread/INFO]: Using 4 threads for Netty based IO +[16:52:46] [Server thread/INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 1 worker threads, and gen parallelism of 1 threads +[16:52:46] [Server thread/WARN]: [!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future. + We recommend installing the spark profiler as a replacement: https://spark.lucko.me/ + For more information please visit: https://github.com/PaperMC/Paper/issues/8948 +[16:52:46] [Server thread/INFO]: Default game type: SURVIVAL +[16:52:46] [Server thread/INFO]: Generating keypair +[16:52:46] [Server thread/INFO]: Starting Minecraft server on *:49877 +[16:52:46] [Server thread/INFO]: Using epoll channel type +[16:52:46] [Server thread/INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity. +[16:52:46] [Server thread/INFO]: Paper: Using OpenSSL 3.0.x (Linux x86_64) cipher from Velocity. +[16:52:46] [Server thread/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'worldedit-bukkit-7.3.4-beta-01.jar' in folder 'plugins' +org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/sk89q/worldedit/bukkit/WorldEditPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0 + at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:127) ~[paper-1.20.4.jar:git-Paper-497] + at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.4.jar:git-Paper-497] + at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.4.jar:git-Paper-497] + at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:38) ~[paper-1.20.4.jar:git-Paper-497] + at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.4.jar:git-Paper-497] + at org.bukkit.craftbukkit.v1_20_R3.CraftServer.loadPlugins(CraftServer.java:507) ~[paper-1.20.4.jar:git-Paper-497] + at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[paper-1.20.4.jar:git-Paper-497] + at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-497] + at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-497] + at java.lang.Thread.run(Thread.java:840) ~[?:?] +Caused by: java.lang.UnsupportedClassVersionError: com/sk89q/worldedit/bukkit/WorldEditPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0 + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] + at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?] + at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:243) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:592) ~[?:?] + at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:169) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] + at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] + at java.lang.Class.forName0(Native Method) ~[?:?] + at java.lang.Class.forName(Class.java:467) ~[?:?] + at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:78) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] + at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:123) ~[paper-1.20.4.jar:git-Paper-497] + ... 9 more +[16:52:46] [Server thread/INFO]: Preparing level "world" +[16:52:56] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld +[16:52:56] [Server thread/INFO]: Time elapsed: 118 ms +[16:52:56] [Server thread/INFO]: Preparing start region for dimension minecraft:the_nether +[16:52:56] [Server thread/INFO]: Time elapsed: 65 ms +[16:52:56] [Server thread/INFO]: Preparing start region for dimension minecraft:the_end +[16:52:56] [Server thread/INFO]: Time elapsed: 80 ms +[16:52:56] [Server thread/INFO]: Starting GS4 status listener +[16:52:56] [Server thread/INFO]: Thread Query Listener started +[16:52:56] [Query Listener #1/INFO]: Query running on 0.0.0.0:9898 +[16:52:56] [Server thread/INFO]: JMX monitoring enabled +[16:52:56] [Server thread/INFO]: Running delayed init tasks +[16:52:56] [Server thread/INFO]: Done (10.766s)! For help, type "help" +[16:52:56] [Server thread/INFO]: ************************************************************************************* +[16:52:56] [Server thread/INFO]: This is the first time you're starting this server. +[16:52:56] [Server thread/INFO]: It's recommended you read our 'Getting Started' documentation for guidance. +[16:52:56] [Server thread/INFO]: View this and more helpful information here: https://docs.papermc.io/paper/next-steps +[16:52:56] [Server thread/INFO]: ************************************************************************************* +[16:52:56] [Server thread/INFO]: Timings Reset \ No newline at end of file From 1499e778f8c82026fe4a0f7e48f22e33f1bfa74e Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Thu, 4 Jul 2024 12:30:17 +0200 Subject: [PATCH 2/3] Rewrite regex to match old and new unsupported class version errors --- .../Bukkit/UnsupportedClassVersionProblem.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Analysis/Problem/Bukkit/UnsupportedClassVersionProblem.php b/src/Analysis/Problem/Bukkit/UnsupportedClassVersionProblem.php index 48df6b7..428766c 100644 --- a/src/Analysis/Problem/Bukkit/UnsupportedClassVersionProblem.php +++ b/src/Analysis/Problem/Bukkit/UnsupportedClassVersionProblem.php @@ -2,8 +2,6 @@ namespace Aternos\Codex\Minecraft\Analysis\Problem\Bukkit; -use Aternos\Codex\Minecraft\Analysis\Solution\Bukkit\PluginInstallDifferentVersionSolution; -use Aternos\Codex\Minecraft\Analysis\Solution\Bukkit\ServerInstallDifferentVersionSolution; use Aternos\Codex\Minecraft\Analysis\Solution\File\FileDeleteSolution; use Aternos\Codex\Minecraft\Analysis\Solution\UpdateJavaSolution; use Aternos\Codex\Minecraft\Translator\Translator; @@ -52,9 +50,13 @@ public function getMessage(): string */ public function setMatches(array $matches, mixed $patternKey): void { - $this->pluginPath = $matches[1]; - $this->pluginName = $matches[2]; - $this->classFileVersion = $matches[3]; + $pluginFileName = $matches[1]; // worldedit-bukkit-7.3.4-beta-01.jar + $pluginName = $matches[2]; // worldedit-bukkit-7.3.4-beta-01 + $folderName = $matches[3]; // plugins + + $this->pluginPath = $folderName . '/' . $pluginFileName; + $this->pluginName = $pluginName; + $this->classFileVersion = $matches[4]; $this->addSolution((new FileDeleteSolution())->setRelativePath($this->getPluginPath())); $this->addSolution((new UpdateJavaSolution())->setVersion($this->getJavaVersion())); @@ -71,7 +73,9 @@ public function setMatches(array $matches, mixed $patternKey): void public static function getPatterns(): array { return [ - '/Could not load \'(plugins[\/\\\]((?!\.jar).*)\.jar)\' in folder \'[^\']+\'' + '/Could not load \'plugins[\/\\\](((?!\.jar).*)\.jar)\' in folder \'([^\']+)\'' + . '\norg\.bukkit\.plugin\.InvalidPluginException\: java\.lang\.UnsupportedClassVersionError: .+ \(class file version (\d+)\.\d+\)/', + '/Could not load plugin \'(((?!\.jar).*)\.jar)\' in folder \'([^\']+)\'' . '\norg\.bukkit\.plugin\.InvalidPluginException\: java\.lang\.UnsupportedClassVersionError: .+ \(class file version (\d+)\.\d+\)/' ]; } From f8aff60f11ae1a6a40e15349598069e19fb40aec Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Thu, 4 Jul 2024 12:30:58 +0200 Subject: [PATCH 3/3] Add tests --- test/tests/Logs/AutoLogsTest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/tests/Logs/AutoLogsTest.php b/test/tests/Logs/AutoLogsTest.php index 82a6f39..ce0985f 100644 --- a/test/tests/Logs/AutoLogsTest.php +++ b/test/tests/Logs/AutoLogsTest.php @@ -398,9 +398,19 @@ public function test_paper_plugin_disabling(): void * @return void * @throws Exception */ - public function test_paper_plugin_unsupported_class_version(): void + public function test_paper_plugin_unsupported_class_version_1_16_5(): void { - $log = new TestLog('Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version.log'); + $log = new TestLog('Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-16-5.log'); + $this->assertStringEqualsFile($log->getExpectedPath(), $log->getOutput(), $log->getLogPath()); + } + + /** + * @return void + * @throws Exception + */ + public function test_paper_plugin_unsupported_class_version_1_20_4(): void + { + $log = new TestLog('Vanilla/Bukkit/Paper/paper-plugin-unsupported-class-version-1-20-4.log'); $this->assertStringEqualsFile($log->getExpectedPath(), $log->getOutput(), $log->getLogPath()); }