-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
Windows 10 Professional 21H1 19043.1348
java --version java 17 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724) Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)
mvn --version Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\Program Files\Maven\bin\.. Java version: 16, vendor: AdoptOpenJDK, runtime: C:\Program Files\AdoptOpenJDK\jdk-16.0.0.36-hotspot Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Windows 10 Professional 21H1 19043.1348 java --version java 17 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724) Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing) mvn --version Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: C:\Program Files\Maven\bin\.. Java version: 16, vendor: AdoptOpenJDK, runtime: C:\Program Files\AdoptOpenJDK\jdk-16.0.0.36-hotspot Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10" , version: "10.0" , arch: "amd64" , family: "windows"
-
CraftBukkit version 3334-Spigot-a5dea1c-a008701 (MC: 1.18) (Implementing API version 1.18-R0.1-SNAPSHOT)
-
Yes
Loading libraries from plugin annotations seems not to work properly since updating to 1.18. Both HikariCP and Flyway throw an exception on load with this stack trace (library specific parts are of course different, but the root cause and exception message seem to be the same:
[23:45:28] [Server thread/INFO]: [Libtest] Enabling Libtest v1.0.0 [23:45:28] [Server thread/ERROR]: Error occurred while enabling Libtest v1.0.0 (Is it up to date?) java.util.ServiceConfigurationError: org.slf4j.spi.SLF4JServiceProvider: org.apache.logging.slf4j.SLF4JServiceProvider n ot a subtype at java.util.ServiceLoader.fail(ServiceLoader.java:593) ~[?:?] at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244) ~[?:?] at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?] at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?] at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?] at org.slf4j.LoggerFactory.findServiceProviders(LoggerFactory.java:104) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4] at org.slf4j.LoggerFactory.bind(LoggerFactory.java:147) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4] at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:139) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4 ] at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:418) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4] at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:404) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4] at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:353) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4] at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:379) ~[slf4j-api-1.8.0-beta4.jar:1.8.0-beta4] at com.zaxxer.hikari.HikariConfig.<clinit>(HikariConfig.java:48) ~[?:?] at ooo.sansk.libtest.LibtestPlugin.onEnable(LibtestPlugin.java:22) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18-R0.1-SNAPSH OT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18-R0.1-SNAPS HOT.jar:?] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:525) ~[spigot-1.18-R0.1-SNAPSHOT.ja r:3334-Spigot-a5dea1c-a008701] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:439) ~[spigot-1.18-R0.1-SNAPSHOT.j ar:3334-Spigot-a5dea1c-a008701] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:611) ~[spigot-1.18-R0.1-SNAPSHOT.jar:333 4-Spigot-a5dea1c-a008701] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:412) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334 -Spigot-a5dea1c-a008701] at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:262) ~[spigot-1.18-R0.1-SNAPSHOT.jar:33 34-Spigot-a5dea1c-a008701] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:993) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334-Spigot- a5dea1c-a008701] at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:303) ~[spigot-1.18-R0.1-SNAPSHOT.jar:3334- Spigot-a5dea1c-a008701] at java.lang.Thread.run(Thread.java:833) [?:?]
Shading the libraries however does seem to work correctly.
Attached are two small projects. One implementing HikariCP with the annotations, the other using maven-shade. A running database to connect to is not required to reproduce the issue. The shaded variant seems to attempt to connect, while the annotation plugin does not reach that point.