PaperMC / Paperclip

Bootstrap utility and launcher for the Paper Minecraft server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.util.zip.ZipException: error in opening zip file

zLupa opened this issue · comments

commented
[root@lupa lobby]# java -jar server.jar 
Downloading vanilla jar...
Exception in thread "main" java.lang.InternalError: java.util.zip.ZipException: error in opening zip file
	at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:1052)
	at sun.misc.URLClassPath.getResource(URLClassPath.java:249)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:405)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:215)
	at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
	at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
	at sun.security.jca.ProviderList.getProvider(ProviderList.java:233)
	at sun.security.jca.ProviderList.getService(ProviderList.java:331)
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:157)
	at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
	at javax.net.ssl.SSLContext.getDefault(SSLContext.java:96)
	at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:122)
	at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:332)
	at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:289)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(HttpsURLConnectionImpl.java:99)
	at sun.net.www.protocol.https.Handler.openConnection(Handler.java:62)
	at sun.net.www.protocol.https.Handler.openConnection(Handler.java:57)
	at java.net.URL.openConnection(URL.java:1002)
	at java.net.URL.openStream(URL.java:1068)
	at io.papermc.paperclip.Paperclip.checkVanillaJar(Paperclip.java:181)
	at io.papermc.paperclip.Paperclip.checkPaperJar(Paperclip.java:112)
	at io.papermc.paperclip.Paperclip.setupEnv(Paperclip.java:91)
	at io.papermc.paperclip.Paperclip.main(Paperclip.java:45)
Caused by: java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:225)
	at java.util.zip.ZipFile.<init>(ZipFile.java:155)
	at java.util.jar.JarFile.<init>(JarFile.java:166)
	at java.util.jar.JarFile.<init>(JarFile.java:103)
	at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:940)
	at sun.misc.URLClassPath$JarLoader.access$800(URLClassPath.java:801)
	at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:886)
	at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:879)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:878)
	at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:1050)
	... 31 more

Plugin list:

  • No plugins

Actions to reproduce (if known):

Start the server and that error appear

Paper version:

Can't run the server to do '/version,' but i'm using the build 148 from papermc 1.16.2

Corrupt jar. Redownload the file from our website.

commented

I re-downloaded the jar same error

I re-downloaded the jar same error

Delete your cache folder in your server directory and try re-running the jar.

Also duplicate of PaperMC/Paper#3483

commented

I re-downloaded the jar same error

Delete your cache folder in your server directory and try re-running the jar.

Deleted the cache folder, the same error.

  1. Ensure server is off
  2. Delete cache folder
  3. Delete old paper-148.jar
  4. Download new paper-150.jar
  5. Boot?
commented
  1. Server doesn't start so is off.
  2. Deleted the cache folder.
  3. deleted paper and re-download.

Also i tested in a new folder with no data and the same error appears

Definitely weird, what OS are you running this on? Also, try and verify checksums:
Download from: https://papermc.io/api/v1/paper/1.16.2/150/download
md5: 5d581ed3b8734052d64644c505832535
sha1sum: c2bfe9bb18b3ed63c84004c3970854eb34380d12
And had no issues booting.

commented

I'm using CentOS 7. md5sum is ok
image

Alright, next question is what version of Java? java -version output

commented

image

openJDK 1.8.0

I think something is wrong with your JDK.

It's failing when trying to load the SSLContextSpi implementation for the SSL protocol (whichever protocol it is).

What's supposed to happen when an implementation can't be found is NoSuchAlgorithmException is thrown. This is not what's happening. Instead, the classloader is throwing an error stating the zip (jar) file is corrupt when it attempts to load that class.

Note: This does not mean the JDK found or didn't find the implementation needed for the protocol. This exception was thrown while attempting to enumerate the implementations to find the right one in the first place. This is one of those things which should never happen.

Now what I must stress is all of this code I'm referring to is inside the JDK. All Paperclip is doing here is attempting to open a connection with the URL to download the vanilla jar. This makes me almost certain that your JDK installation is broken.