Java lang illegalstateexception zip file closed

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

Zip file Closed #1820

Zip file Closed #1820

status:invalid This does not describe a request or bug with WorldEdit type:bug Incorrect behavior, not working as intended

Comments

WorldEdit Version

Platform Version

Bug Description

as soon as I restart the server, I get the following error message on exit, as long as World Edit is in the plugin directory.

. [15:05:22 ERROR]: Caught previously unhandled exception :
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:828) ~[. ]
at java.util.zip.ZipFile.getEntry(ZipFile.java:327) ~[. ]
at java.util.jar.JarFile.getEntry(JarFile.java:513) ~[. ]
at java.util.jar.JarFile.getJarEntry(JarFile.java:468) ~[. ]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:158) ~[patched_1.17.1.jar:git-Paper-90]
at java.lang.ClassLoader.loadClass(ClassLoader.java:586) ~[. ]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:108) ~[patched_1.17.1.jar:git-Paper-90]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[patched_1.17.1.jar:git-Paper-90]
at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[. ]
at com.sk89q.worldedit.bukkit.WorldEditPlugin.wrapCommandSender(WorldEditPlugin.java:478) ~[. ]
at com.sk89q.worldedit.bukkit.BukkitCommandInspector.lambda$testPermission$0(BukkitCommandInspector.java:80) ~[. ]
at org.enginehub.piston.inject.MapBackedValueStore.lambda$injectedValue$0(MapBackedValueStore.java:56) ~[. ]
at java.util.Optional.flatMap(Optional.java:289) ~[. ]
at org.enginehub.piston.inject.MapBackedValueStore.injectedValue(MapBackedValueStore.java:56) ~[. ]
at org.enginehub.piston.inject.InjectedValueAccess.injectedValue(InjectedValueAccess.java:44) ~[. ]
at com.sk89q.worldedit.command.util.PermissionCondition.satisfied(PermissionCondition.java:46) ~[. ]
at com.sk89q.worldedit.bukkit.BukkitCommandInspector.testPermission(BukkitCommandInspector.java:81) ~[. ]
at com.sk89q.bukkit.util.DynamicPluginCommand.testPermissionSilent(DynamicPluginCommand.java:100) ~[. ]
at org.bukkit.craftbukkit.v1_17_R1.command.BukkitCommandWrapper.test(BukkitCommandWrapper.java:48) ~[patched_1.17.1.jar:git-Paper-90]
at org.bukkit.craftbukkit.v1_17_R1.command.BukkitCommandWrapper.test(BukkitCommandWrapper.java:20) ~[patched_1.17.1.jar:git-Paper-90]
at com.mojang.brigadier.tree.CommandNode.canUse(CommandNode.java:78) ~[patched_1.17.1.jar:git-Paper-90]
at com.mojang.brigadier.CommandDispatcher.parseNodes(CommandDispatcher.java:358) ~[patched_1.17.1.jar:git-Paper-90]
at com.mojang.brigadier.CommandDispatcher.parse(CommandDispatcher.java:348) ~[patched_1.17.1.jar:git-Paper-90]
at io.papermc.paper.console.BrigadierCommandHighlighter.highlight(BrigadierCommandHighlighter.java:28) ~[patched_1.17.1.jar:git-Paper-90]
at org.jline.reader.impl.LineReaderImpl.getHighlightedBuffer(LineReaderImpl.java:3818) ~[patched_1.17.1.jar:git-Paper-90]
at org.jline.reader.impl.LineReaderImpl.getDisplayedBufferWithPrompts(LineReaderImpl.java:3800) ~[patched_1.17.1.jar:git-Paper-90]
at org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3700) ~[patched_1.17.1.jar:git-Paper-90]
at org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3636) ~[patched_1.17.1.jar:git-Paper-90]
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:629) ~[patched_1.17.1.jar:git-Paper-90]
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:418) ~[patched_1.17.1.jar:git-Paper-90]
at net.minecrell.terminalconsole.SimpleTerminalConsole.readCommands(SimpleTerminalConsole.java:158) ~[patched_1.17.1.jar:git-Paper-90]
at net.minecrell.terminalconsole.SimpleTerminalConsole.start(SimpleTerminalConsole.java:141) ~[patched_1.17.1.jar:git-Paper-90]
at net.minecraft.server.dedicated.DedicatedServer$1.run(DedicatedServer.java:113) ~[patched_1.17.1.jar:git-Paper-90]

Expected Behavior

no error xD by restart the server

Reproduction Steps

install paper 1.17.1 -> start server
if its run -> stop server
put World Edit in Plugin folder
start server
if its run -> restart server
error

Источник

How to fix zip file closed errors in Minecraft?

How to fix zip file closed errors in Minecraft?

If you run a Minecraft server, you might have come across cryptic errors such as “zip file closed” from various plugins, mods, or even the server itself. The error will often show up as java.lang.IllegalStateException: zip file closed . These errors can be caused by many different problems, most of which can easily be resolved. It’s also important to note that if a specific plugin or mod is mentioned in the error, it does not mean that plugin or mod is the problem.

Possible Causes and How to Fix it

Replacing JAR files while the server is running

The most common cause of errors like this is replacing jar files while the server is running. These can be jar files of plugins, mods, or even the server itself, all can cause this error. If this is what has caused the error, the fix is simple. Just restart your server, and in the future only replace jar files while the server has shut down. Given the way Java works, it can sometimes need to load code from jar files while the server is running. If a jar file is swapped out, suddenly the code that it is loading might not match up what it has loaded before, causing unexpected behaviour and errors.

Another way this can happen is if the jar file has actually been removed. Either by the file changing name, being deleted, getting moved, or the physical device being unplugged.

Background software modifying files

This can also happen while running a server within a cloud-synced folder, such as OneDrive or Dropbox, as they often change files as they’re used. Other software that can impact files in this way are Antivirus programs, backup software, or anything that performs occasional system scans. These can all cause the file to be marked as modified, and Java to get confused and consider the file closed.

In some cases, a plugin failing to load can cause this error to happen for other plugins that access the failing plugin. To fix this, check your logs to see if any plugins are not loading, and ask the developers of those plugins for help. Generally, this will be most noticeable due to other errors occurring in your logs other than the “zip file closed” ones. In these cases, it’s a good idea to get all of the others fixed to see if it resolves the issue.

Bukkit-based servers such as Paper include a /reload command, which is known to cause issues. While there are many more devastating issues that command can cause, one possible issue is the “zip file closed” error. To resolve this, restart your server and don’t use /reload , or plugins such as PlugMan to reload plugins.

Running broken forks of Paper

Many servers are now running modified forks of the popular server software Paper, however some of these can contain large numbers of bugs and other issues. Some of these forks make buggy changes in a component known as a classloader, which is what Bukkit-based servers use to load plugins. A straightforward way to tell if this is your issue is to switch to Paper and see if that resolves the issue. If it does, issue solved.

Worst case, it’s also possible you’ve either hit a Java bug, or a bug in the distribution of Java that you have downloaded. Many different companies package their own releases of Java, some of which can have modifications that will affect running a Minecraft server. A known working distribution of Java is AdoptOpenJDK. Other gotchas to look out for with Java distributions is making sure that they aren’t headless, and that you’re running the latest version compatible with your release of Minecraft.

Low quality Minecraft server host

If you’re using a Minecraft server host, it’s possible poor configuration of the underlying systems that power your Minecraft server are causing this issue. It can be hard to identify a good Minecraft server host, but determining if they’re causing this issue can be even harder. Usually if your host is causing this issue, it’ll be due to either software they’re running in the background that’s modifying files like mentioned above, or due to a broken version of Java being installed on the machine. If you’ve tried everything else and found that nothing is working, it might be worth contacting your host’s support about the issue.

If it’s still an issue, it’s time to start narrowing down any plugins or mods you have until the issue is resolved. There are many ways to do this, some are outlined in this post. From here, your best bet is to ask for support from the developers of the server software you’re using. Be it Paper, Forge, Fabric, or something else. It’s possible they’ve got a bug, or something else less common is going on.

The zip file closed error can be hard to pin down, as it nearly never tells you what’s causing it. Luckily in most cases the fix is simple. Be it no longer doing harmful things, or switching server software, almost all cases can easily be solved.

This article is part of a series on how to run a Minecraft server. Click here to find out more

About the Author

Hi, I’m Maddy Miller, a Senior Software Engineer at Clipchamp at Microsoft. In my spare time I love writing articles, and I also develop the Minecraft mods WorldEdit, WorldGuard, and CraftBook. My opinions are my own and do not represent those of my employer in any capacity.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

java.lang.IllegalStateException: zip file closed #279

java.lang.IllegalStateException: zip file closed #279

Comments

When using version 9.12 on kubernetes 1.15 with spring boot 2.2.4 we get following error.
When using version 9.11 we do not have this issue.

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [x.x.x.SerializedTypeNameResolver]: Factory method 'serializedTypeNameResolver' threw exception; nested exception is java.lang.IllegalStateException: zip file closed at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.3.RELEASE.jar!/:5.2.3.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.3.RELEASE.jar!/:5.2.3.RELEASE] . 95 common frames omitted Caused by: java.lang.IllegalStateException: zip file closed at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:915) ~[na:na] at java.base/java.util.zip.ZipFile.stream(ZipFile.java:647) ~[na:na] at java.base/java.util.zip.ZipFile$1.stream(ZipFile.java:1131) ~[na:na] at java.base/java.util.jar.JarFile.stream(JarFile.java:534) ~[na:na] at org.reflections.vfs.ZipDir.lambda$getFiles$2(ZipDir.java:21) ~[reflections-0.9.12.jar!/:na] at org.reflections.Reflections.scan(Reflections.java:260) ~[reflections-0.9.12.jar!/:na] at org.reflections.Reflections.scan(Reflections.java:216) ~[reflections-0.9.12.jar!/:na] at org.reflections.Reflections.(Reflections.java:137) ~[reflections-0.9.12.jar!/:na] at org.reflections.Reflections.(Reflections.java:182) ~[reflections-0.9.12.jar!/:na] at org.reflections.Reflections.(Reflections.java:155) ~[reflections-0.9.12.jar!/:na] at x.x.x.serializedTypeNameResolver.getTypesForName(SerializedTypeNameResolver.java:44) ~[integration-axondb-11.369.0.jar!/:11.369.0] at x.x.x.serializedTypeNameResolver.(GSerializedTypeNameResolver.java:23) ~[integration-axondb-11.369.0.jar!/:11.369.0] at x.x.x.serializedTypeNameResolver(AxonServerSharedConfiguration.java:115) ~[integration-axondb-11.369.0.jar!/:11.369.0] 
private Map> getTypesForName() < Reflections reflections = new Reflections("x.x.x"); return reflections.getTypesAnnotatedWith(JsonTypeInfo.class).stream() .map(clazz ->clazz.getAnnotationsByType(JsonSubTypes.class)) .flatMap(Arrays::stream) .flatMap(annotation -> Arrays.stream(annotation.value())) .filter(type -> isValidType(type.value())) .collect(toMap(JsonSubTypes.Type::name, JsonSubTypes.Type::value, (name1, name2) -> name1)); > 

«edit»
It runs on adoptOpenJdk 11.0.6_10

The text was updated successfully, but these errors were encountered:

Источник

Читайте также:  Xsl xml with php
Оцените статью