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

Failed to load class files of expansion #76

Open
masterhacka opened this issue Jan 4, 2024 · 3 comments
Open

Failed to load class files of expansion #76

masterhacka opened this issue Jan 4, 2024 · 3 comments

Comments

@masterhacka
Copy link

Placeholder API is dropping sometimes the following issue on startup an no of the extensions are going to work. What can I do?

[03:35:55] [Server thread/ERROR]: [PlaceholderAPI] Failed to load class files of expansion. java.util.concurrent.CompletionException: zip file closed (expansion file: /home/container/plugins/PlaceholderAPI/expansions/Javascript-Expansion-2.1.2.jar) at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:443) ~[PlaceholderAPI-2.11.5.jar:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?] Caused by: java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:846) ~[?:?] at java.util.zip.ZipFile.getEntry(ZipFile.java:338) ~[?:?] at java.util.jar.JarFile.getEntry(JarFile.java:516) ~[?:?] at java.util.jar.JarFile.getJarEntry(JarFile.java:471) ~[?:?] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:209) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:593) ~[?:?] 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:144) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.entrypoint.classloader.group.SpigotPluginClassLoaderGroup.lookupClass(SpigotPluginClassLoaderGroup.java:43) ~[paper-1.20.4.jar:git-Paper-364] at io.papermc.paper.plugin.entrypoint.classloader.group.SimpleListPluginClassLoaderGroup.getClassByName(SimpleListPluginClassLoaderGroup.java:37) ~[paper-1.20.4.jar:git-Paper-364] at io.papermc.paper.plugin.entrypoint.classloader.group.LockingClassLoaderGroup.getClassByName(LockingClassLoaderGroup.java:34) ~[paper-1.20.4.jar:git-Paper-364] at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:187) ~[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:580) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?] at me.clip.placeholderapi.util.FileUtil.findClass(FileUtil.java:62) ~[PlaceholderAPI-2.11.5.jar:?] at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:421) ~[PlaceholderAPI-2.11.5.jar:?] ... 7 more

@Goinging
Copy link

Goinging commented May 8, 2024

I am getting the exact same error, however, it only happens half the time I boot up my server and for some reason it only affects this other server host I am moving to, but not the other one I have been using this expansion on for months.

@Goinging
Copy link

Goinging commented May 9, 2024

This is the one that I am getting [18:53:20] [Server thread/ERROR]: [PlaceholderAPI] Failed to load class files of expansion.
java.util.concurrent.CompletionException: zip file closed (expansion file: /home/container/plugins/PlaceholderAPI/expansions/Javascript-Expansion-2.1.2.jar)
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:443) ~[PlaceholderAPI-2.11.5.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
Caused by: java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:846) ~[?:?]
at java.util.zip.ZipFile.getEntry(ZipFile.java:338) ~[?:?]
at java.util.jar.JarFile.getEntry(JarFile.java:516) ~[?:?]
at java.util.jar.JarFile.getJarEntry(JarFile.java:471) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:209) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:593) ~[?:?]
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:144) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.entrypoint.classloader.group.SpigotPluginClassLoaderGroup.lookupClass(SpigotPluginClassLoaderGroup.java:43) ~[paper-1.20.4.jar:git-Paper-493]
at io.papermc.paper.plugin.entrypoint.classloader.group.SimpleListPluginClassLoaderGroup.getClassByName(SimpleListPluginClassLoaderGroup.java:37) ~[paper-1.20.4.jar:git-Paper-493]
at io.papermc.paper.plugin.entrypoint.classloader.group.LockingClassLoaderGroup.getClassByName(LockingClassLoaderGroup.java:34) ~[paper-1.20.4.jar:git-Paper-493]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:187) ~[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:580) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
at me.clip.placeholderapi.util.FileUtil.findClass(FileUtil.java:62) ~[PlaceholderAPI-2.11.5.jar:?]
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:421) ~[PlaceholderAPI-2.11.5.jar:?]
... 7 more

@Goinging
Copy link

Goinging commented May 9, 2024

After a ton of testing I have confirmed a couple of things. For one, this bug appears only on startup and if you reload the plugin even after it stops working due to this error it will reload perfectly fine. I have also confirmed that it is not a problem with any custom javascript files as even without them and with the expansion booted up for the first time it can still do this. Now I have no idea why this only happens about half the time when booting up, it points to it being a compatibility error with some other plugin or something like that, but then again, why isn't it happening on my main server and only on this other server when they are on basically the same backup? I don't know, but I have ran out of clues and ideas.

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