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

class org.easymock.internal.ClassMockingData not visible from class org.bukkit.entity.Spigot$$$EasyMock$1 #515

Open
Pikachu920 opened this issue Jan 1, 2024 · 5 comments
Assignees
Milestone

Comments

@Pikachu920
Copy link

hello!

first of all, thank you for your efforts in maintaining this library and happy new year. I am currently encountering an exception similar to the one mentioned in #356 on v5.2.0. I have a test here which causes this stacktrace on v5.2.0, but succeeds without error on v5.0.1. The full code is available at SkriptLang/Skript#6204. To repro, just change the version of easymock in build.gradle to 5.2.0 and run the quickTest gradle task. Heads up, the quickTest task does start a short-lived test Minecraft server on port 25565.

@henri-tremblay
Copy link
Contributor

Hi. I haven't tried yet but it feels a --add-open org.easymock/org.easymock.internal=org.bukkit (or whatever the bukkit entity module name is) could fix your problem

@Pikachu920
Copy link
Author

thank you for your response! I tried --add-open org.easymock/org.easymock.internal=org.bukkit and --add-open org.easymock/org.easymock.internal=org.bukkit.entity but unfortunately I'm still receiving bad field type alias: class org.easymock.internal.ClassMockingData not visible from class org.bukkit.entity.Spigot$$$EasyMock$1

@henri-tremblay
Copy link
Contributor

Interesting. So it's deeper than that. I will need to investigate.

@henri-tremblay
Copy link
Contributor

I tried running on the dev/feature branch. Tests are failing with

[20:47:22 INFO]: [Skript] Enabling Skript v2.8.2-nightly-0bfec0b7
[20:47:22 INFO]: [Skript] You're currently running a development build of Skript. No updates will be automatically installed.
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! [Skript] Severe Error:
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! You're running a (buggy) nightly version of Skript.
[20:47:23 ERROR]: #!#! If this is not a test server, switch to a more stable release NOW!
[20:47:23 ERROR]: #!#! Your players are unlikely to appreciate crashes and/or data loss due to Skript bugs.
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! Just testing things? Good. Please report this bug, so that we can fix it before a stable release.
[20:47:23 ERROR]: #!#! Issue tracker: https://github.com/SkriptLang/Skript/issues
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! Stack trace:
[20:47:23 ERROR]: #!#! java.nio.file.NotDirectoryException: /aliases-english
[20:47:23 ERROR]: #!#!     at jdk.zipfs/jdk.nio.zipfs.ZipDirectoryStream.<init>(ZipDirectoryStream.java:58)
[20:47:23 ERROR]: #!#!     at jdk.zipfs/jdk.nio.zipfs.ZipPath.newDirectoryStream(ZipPath.java:755)
[20:47:23 ERROR]: #!#!     at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newDirectoryStream(ZipFileSystemProvider.java:245)
[20:47:23 ERROR]: #!#!     at java.base/java.nio.file.Files.newDirectoryStream(Files.java:482)
[20:47:23 ERROR]: #!#!     at java.base/java.nio.file.Files.list(Files.java:3792)
[20:47:23 ERROR]: #!#!     at Skript.jar//ch.njol.skript.aliases.Aliases.loadDirectory(Aliases.java:466)
[20:47:23 ERROR]: #!#!     at Skript.jar//ch.njol.skript.aliases.Aliases.loadInternal(Aliases.java:431)
[20:47:23 ERROR]: #!#!     at Skript.jar//ch.njol.skript.aliases.Aliases.load(Aliases.java:387)
[20:47:23 ERROR]: #!#!     at Skript.jar//ch.njol.skript.Skript.onEnable(Skript.java:508)
[20:47:23 ERROR]: #!#!     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
[20:47:23 ERROR]: #!#!     at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188)
[20:47:23 ERROR]: #!#!     at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
[20:47:23 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
[20:47:23 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637)
[20:47:23 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548)
[20:47:23 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671)
[20:47:23 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:431)
[20:47:23 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:308)
[20:47:23 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1131)
[20:47:23 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[20:47:23 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:833)
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! Version Information:
[20:47:23 ERROR]: #!#!   Skript: 2.8.2-nightly-0bfec0b7
[20:47:23 ERROR]: #!#!     Flavor: skriptlang-nightly
[20:47:23 ERROR]: #!#!     Date: 20:47:11.666207
[20:47:23 ERROR]: #!#!   Bukkit: 1.20.4-R0.1-SNAPSHOT
[20:47:23 ERROR]: #!#!   Minecraft: 1.20.4
[20:47:23 ERROR]: #!#!   Java: 17.0.6 (OpenJDK 64-Bit Server VM 17.0.6+10)
[20:47:23 ERROR]: #!#!   OS: Mac OS X x86_64 14.3
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! Server platform: Paper
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! Current node: null
[20:47:23 ERROR]: #!#! Current item: null
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! Thread: Server thread
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! Language: english
[20:47:23 ERROR]: #!#! Link parse mode: DISABLED
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: #!#! End of Error.
[20:47:23 ERROR]: #!#! 
[20:47:23 ERROR]: Error occurred while enabling Skript v2.8.2-nightly-0bfec0b7 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
        at ch.njol.skript.Skript.onEnable(Skript.java:534) ~[Skript.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188) ~[paper-1.20.4.jar:git-Paper-408]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.4.jar:git-Paper-408]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637) ~[paper-1.20.4.jar:git-Paper-408]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548) ~[paper-1.20.4.jar:git-Paper-408]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671) ~[paper-1.20.4.jar:git-Paper-408]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:431) ~[paper-1.20.4.jar:git-Paper-408]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.4.jar:git-Paper-408]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-408]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-408]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalArgumentException: type stationary water not found
        at ch.njol.skript.aliases.Aliases.javaItemType(Aliases.java:566) ~[Skript.jar:?]
        at ch.njol.skript.classes.data.BukkitEventValues.<clinit>(BukkitEventValues.java:385) ~[Skript.jar:?]
        ... 13 more

@Pikachu920
Copy link
Author

I tried running on the dev/feature branch. Tests are failing with

oh, sorry about that I have realized I made a few mistakes in my instrutions. first, i should have mentioned that Skript stores some data (aliases) in a submodule so you will have to clone the repo w/ submodules: git clone --recurse-submodules https://github.com/SkriptLang/Skript.git. second, the task is actually the junit test task junitJava17. I'm able to reproduce the stacktrace by running the following commands from an empty dir:

git clone --recurse-submodules https://github.com/SkriptLang/Skript.git
cd Skript
# changing easymock version to 5.2.0
notepad build.gradle
# stacktrace appears in test results
gradlew.bat junitJava17

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