Could not load 'plugins/Shopkeepers-2.22.1.jar'
planethouki opened this issue · 5 comments
Preliminaries:
- Shopkeepers version:
2.22.1
- Spigot version:
4267-Spigot-5bbef5a-403accd (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
- I have checked that my issue/question does not get answered by:
- The documentation.
- The FAQ.
- The Known Issues.
- I have checked all open and closed issues, but none seems to fit my issue/question.
Reproduction on a fresh and up-to-date Spigot server:
I was able
to reproduce my issue on a freshly set up and up-to-date Spigot server (currently 4267-Spigot-5bbef5a-403accd (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
) with the latest version of Shopkeepers (currently 2.22.1
), with no other plugins and with no kinds of other server or client mods.
The issue:
Description of the issue.
When starting the server, as mentioned in the title, an error message along with several stack traces and races is output, and the plugin is not enabled.
Step-by-step instructions on how to reproduce the issue.
- Create a new folder.
- Place
spigot-1.21.jar
andeula.txt
in the folder. - Create a
plugins
folder and placeShopkeepers-2.22.1.jar
in it. - Run
java -jar spigot-1.21.jar -nogui
.
Observed behavior.
Refer to the server logs. The /plugins
command outputs Plugins (0):
.
Expected behavior.
The plugin should be enabled.
Server logs (from server startup until issue). Consider enabling debug mode in the config for additional console output.
Starting server
Loading libraries, please wait...
[11:02:55] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[11:02:55] [ServerMain/INFO]: Found new data pack file/bukkit, loading it automatically
[11:02:56] [ServerMain/INFO]: No existing world data, creating new world
[11:02:57] [ServerMain/INFO]: Loaded 1290 recipes
[11:02:55] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[11:02:55] [ServerMain/INFO]: Found new data pack file/bukkit, loading it automatically
[11:02:56] [ServerMain/INFO]: No existing world data, creating new world
[11:02:57] [ServerMain/INFO]: Loaded 1290 recipes
[11:02:59] [Server thread/INFO]: Starting minecraft server version 1.21
[11:02:59] [Server thread/INFO]: Loading properties
[11:02:59] [Server thread/INFO]: This server is running CraftBukkit version 4267-Spigot-5bbef5a-403accd (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
[11:03:00] [Server thread/INFO]: *** This version of Spigot contains changes to some enums. If you notice that plugins no longer work after updating, please report this to the developers of those plugins first. ***
[11:03:00] [Server thread/INFO]: *** If you cannot update those plugins, you can try setting `settings.compatibility.enum-compatibility-mode` to `true` in `bukkit.yml`. ***
[11:03:00] [Server thread/INFO]: Using 4 threads for Netty based IO
[11:03:00] [Server thread/INFO]: Server Ping Player Sample Count: 12
[11:03:00] [Server thread/INFO]: Debug logging is disabled
[11:03:00] [Server thread/INFO]: Default game type: SURVIVAL
[11:03:00] [Server thread/INFO]: Generating keypair
[11:03:00] [Server thread/INFO]: Starting Minecraft server on *:25565
[11:03:00] [Server thread/INFO]: Using epoll channel type
[11:03:01] [Server thread/ERROR]: Could not load 'plugins/Shopkeepers-2.22.1.jar'
org.bukkit.plugin.InvalidPluginException: Exception initializing main class `com.nisovin.shopkeepers.SKShopkeepersPlugin'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:96) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:406) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:313) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:122) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_21_R1.CraftServer.loadPlugins(CraftServer.java:464) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4267-Spigot-5bbef5a-403accd]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:236) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4267-Spigot-5bbef5a-403accd]
at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1017) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4267-Spigot-5bbef5a-403accd]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4267-Spigot-5bbef5a-403accd]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:88) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
... 9 more
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/nisovin/shopkeepers/shopobjects/living/types/ZombieVillagerShop.cycleProfession(Z)V @8: invokestatic
Reason:
Type 'org/bukkit/entity/Villager$Profession' (current frame, stack[2]) is not assignable to 'java/lang/Enum'
Current Frame:
bci: @8
flags: { }
locals: { 'com/nisovin/shopkeepers/shopobjects/living/types/ZombieVillagerShop', integer }
stack: { 'com/nisovin/shopkeepers/shopobjects/living/types/ZombieVillagerShop', 'java/lang/Class', 'org/bukkit/entity/Villager$Profession', integer }
Bytecode:
0000000: 2a12 092a b600 981b b800 9ec0 0009 b600
0000010: a0b1
at com.nisovin.shopkeepers.shopobjects.living.SKLivingShopObjectTypes.createLivingShopObjectType(SKLivingShopObjectTypes.java:410) ~[?:?]
at com.nisovin.shopkeepers.shopobjects.living.SKLivingShopObjectTypes.createShopObjectTypes(SKLivingShopObjectTypes.java:255) ~[?:?]
at com.nisovin.shopkeepers.shopobjects.living.SKLivingShopObjectTypes.<init>(SKLivingShopObjectTypes.java:246) ~[?:?]
at com.nisovin.shopkeepers.shopobjects.living.LivingShops.<init>(LivingShops.java:76) ~[?:?]
at com.nisovin.shopkeepers.SKShopkeepersPlugin.<init>(SKShopkeepersPlugin.java:156) ~[?:?]
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:88) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
... 9 more
[11:03:02] [Server thread/INFO]: Preparing level "world"
[11:03:02] [Server thread/INFO]: -------- World Settings For [world] --------
[11:03:02] [Server thread/INFO]: View Distance: 10
[11:03:02] [Server thread/INFO]: Simulation Distance: 10
[11:03:02] [Server thread/INFO]: Item Despawn Rate: 6000
[11:03:02] [Server thread/INFO]: Item Merge Radius: 2.5
[11:03:02] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
[11:03:02] [Server thread/INFO]: Arrow Despawn Rate: 1200 Trident Respawn Rate:1200
[11:03:02] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
...
... Anything else that might be useful to reproduce and identify the issue.
- No other plugins are installed.
java -version
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS, mixed mode, sharing)
cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"
Still broken on 2.22.2.
[09:30:48] [Server thread/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'Shopkeepers-2.22.2.jar' in folder 'plugins/.paper-remapped'
org.bukkit.plugin.InvalidPluginException: Exception initializing main class `com.nisovin.shopkeepers.SKShopkeepersPlugin'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:106) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:125) ~[paper-1.21.jar:1.21-97-e71c1df]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.21.jar:1.21-97-e71c1df]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.21.jar:1.21-97-e71c1df]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:38) ~[paper-1.21.jar:1.21-97-e71c1df]
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:40) ~[paper-1.21.jar:1.21-97-e71c1df]
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:544) ~[paper-1.21.jar:1.21-97-e71c1df]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:290) ~[paper-1.21.jar:1.21-97-e71c1df]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1211) ~[paper-1.21.jar:1.21-97-e71c1df]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-97-e71c1df]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:98) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
... 10 more
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
com/nisovin/shopkeepers/shopobjects/living/types/ZombieVillagerShop.cycleProfession(Z)V @8: invokestatic
Reason:
Type 'org/bukkit/entity/Villager$Profession' (current frame, stack[2]) is not assignable to 'java/lang/Enum'
Current Frame:
bci: @8
flags: { }
locals: { 'com/nisovin/shopkeepers/shopobjects/living/types/ZombieVillagerShop', integer }
stack: { 'com/nisovin/shopkeepers/shopobjects/living/types/ZombieVillagerShop', 'java/lang/Class', 'org/bukkit/entity/Villager$Profession', integer }
Bytecode:
0000000: 2a12 092a b600 981b b800 9ec0 0009 b600
0000010: a0b1
at Shopkeepers-2.22.2.jar/com.nisovin.shopkeepers.shopobjects.living.SKLivingShopObjectTypes.createLivingShopObjectType(SKLivingShopObjectTypes.java:418) ~[Shopkeepers-2.22.2.jar:?]
at Shopkeepers-2.22.2.jar/com.nisovin.shopkeepers.shopobjects.living.SKLivingShopObjectTypes.createShopObjectTypes(SKLivingShopObjectTypes.java:257) ~[Shopkeepers-2.22.2.jar:?]
at Shopkeepers-2.22.2.jar/com.nisovin.shopkeepers.shopobjects.living.SKLivingShopObjectTypes.<init>(SKLivingShopObjectTypes.java:248) ~[Shopkeepers-2.22.2.jar:?]
at Shopkeepers-2.22.2.jar/com.nisovin.shopkeepers.shopobjects.living.LivingShops.<init>(LivingShops.java:76) ~[Shopkeepers-2.22.2.jar:?]
at Shopkeepers-2.22.2.jar/com.nisovin.shopkeepers.SKShopkeepersPlugin.<init>(SKShopkeepersPlugin.java:156) ~[Shopkeepers-2.22.2.jar:?]
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:98) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
... 10 more
Yes, the plugin is currently broken on the latest server versions of 1.21. There is currently no fix yet. I will post an update once this issue is fixed. No ETA.
The author says in version 2.22.2 that ‘This version only works on Spigot versions from before 2024-07-06.
https://www.spigotmc.org/resources/shopkeepers.80756/updates