Akarin-project / Akarin

Akarin is a powerful server software from the 'new dimension'
https://akarin.app
Other
501 stars 63 forks source link

Exception in thread "main" java.util.zip.ZipException: zip END header not found #211

Closed zhenaiwork closed 2 years ago

zhenaiwork commented 2 years ago

Exception in thread "main" java.util.zip.ZipException: zip END header not found

What's going on here, please help


  Task - Update Upstream
  This will update and patch Paper, importing necessary sources for patching.

  Projects:
  - 1 : Paper
  - 2 : Akarin
----------------------------------------
  (0/1) - Apply patches of Tuinity..

/home/zhenai/Java/AK/Akarin/Tuinity
/home/zhenai/Java/AK/Akarin/Tuinity
Downloading unmapped vanilla jar...
Applying class mappings...
Applying member mappings...
Exception in thread "main" java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1469)
        at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1477)
        at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1315)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1277)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:347)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:318)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:284)
        at net.md_5.ss.SpecialSource.map(SpecialSource.java:78)
        at net.md_5.ss.SpecialSource.main(SpecialSource.java:49)
Failed to build Paper
scripts/upstream.sh: 第 27 行: cd: Paper-Server: 没有那个文件或目录
/home/zhenai/Java/AK/Akarin/Tuinity
/home/zhenai/Java/AK/Akarin/Tuinity/scripts/importmcdev.sh: 第 68 行: cd: Paper/Paper-Server/: 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
/home/zhenai/Java/AK/Akarin/Tuinity/scripts/importmcdev.sh: 第 113 行: cd: Paper/Paper-Server/: 没有那个文件或目录
fatal: 路径规格 'src' 未匹配任何文件
error: 路径规格 'src' 未匹配任何 git 已知文件
/home/zhenai/Java/AK/Akarin/Tuinity
rm: 无法删除 'src/net/minecraft/server/*.java': 没有那个文件或目录
cp: 无法获取'/home/zhenai/Java/AK/Akarin/Tuinity/Paper/work/Minecraft/1.15.2/spigot/net/minecraft/server/*.java' 的文件状态(stat): 没有那个文件或目录
/bin/ls: 无法访问 '/home/zhenai/Java/AK/Akarin/Tuinity/Paper/Paper-Server/src/main/java/net/minecraft/server': 没有那个文件或目录
error: 路径规格 '.' 未匹配任何 git 已知文件
Tagging as 1.15.2--9ce64372ea7c9cce8774595a3129324013b13706
Paper: f65f95ce3 Do not let the server load chunks from newer versions
mc-dev:
scripts/upstream.sh: 第 44 行: cd: Paper-API: 没有那个文件或目录
scripts/upstream.sh: 第 44 行: cd: Paper-Server: 没有那个文件或目录
/home/zhenai/Java/AK/Akarin/Tuinity
Rebuilding Forked projects.... 
Importing MC-DEV
/home/zhenai/Java/AK/Akarin/Tuinity
./scripts/importmcdev.sh: 第 68 行: cd: Paper/Paper-Server/: 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
./scripts/importmcdev.sh: 第 113 行: cd: Paper/Paper-Server/: 没有那个文件或目录
fatal: 路径规格 'src' 未匹配任何文件
error: 路径规格 'src' 未匹配任何 git 已知文件
scripts/apply.sh: 第 38 行: cd: /home/zhenai/Java/AK/Akarin/Tuinity/Paper/Paper-API: 没有那个文件或目录
正在获取 origin
Resetting Tuinity-API to Paper-API...
切换到一个新分支 'master'
fatal: 有歧义的参数 'upstream/upstream':未知的版本或路径不存在于工作区中。
使用 '--' 来分隔版本和路径,例如:
'git <命令> [<版本>...] -- [<文件>...]'
  Applying patches to Tuinity-API...
应用:Tuinity POM Changes
error: invalid object 100644 20c473f521e50df57065d3644398f9db777c1a24 for 'pom.xml'
error: 仓库缺乏必要的数据对象以进行三方合并。
打补丁失败于 0001 Tuinity POM Changes
提示:用 'git am --show-current-patch' 命令查看失败的补丁
当您解决这一问题,执行 "git am --continue"。
如果您想要跳过这一补丁,则执行 "git am --skip"。
若要复原至原始分支并停止补丁操作,执行 "git am --abort"。
  Something did not apply cleanly to Tuinity-API.
  Please review above details and finish the apply then
  save the changes with rebuildPatches.sh
Failed to apply patches

进程已结束,退出代码1
zhenaiwork commented 2 years ago

I have tried to change the SDK, but still can't solve it

zhenaiwork commented 2 years ago

This is the error of executing this ./akarin jar

josephworks commented 2 years ago

What version of Java are you using?

zhenaiwork commented 2 years ago

8 and 17

josephworks commented 2 years ago

Be sure to only use 8.

zhenaiwork commented 2 years ago

Or not ··· $ java -version openjdk version "1.8.0_312" OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

zhenaiwork commented 2 years ago

I still have business to come back at 20:00 Beijing time

zhenaiwork commented 2 years ago

This is a new error


----------------------------------------
  Task - Update Upstream
  This will update and patch Paper, importing necessary sources for patching.

  Projects:
  - 1 : Paper
  - 2 : Akarin
----------------------------------------
  (0/1) - Apply patches of Tuinity..

/home/zhenai/Java/AK/Akarin/Tuinity
/home/zhenai/Java/AK/Akarin/Tuinity
Downloading unmapped vanilla jar...
Applying class mappings...
Applying member mappings...
Exception in thread "main" 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:228)
    at java.util.zip.ZipFile.<init>(ZipFile.java:157)
    at java.util.jar.JarFile.<init>(JarFile.java:171)
    at java.util.jar.JarFile.<init>(JarFile.java:135)
    at net.md_5.ss.SpecialSource.map(SpecialSource.java:78)
    at net.md_5.ss.SpecialSource.main(SpecialSource.java:49)
Failed to build Paper
scripts/upstream.sh: 第 27 行: cd: Paper-Server: 没有那个文件或目录
/home/zhenai/Java/AK/Akarin/Tuinity
/home/zhenai/Java/AK/Akarin/Tuinity/scripts/importmcdev.sh: 第 68 行: cd: Paper/Paper-Server/: 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
/home/zhenai/Java/AK/Akarin/Tuinity/scripts/importmcdev.sh: 第 113 行: cd: Paper/Paper-Server/: 没有那个文件或目录
fatal: 路径规格 'src' 未匹配任何文件
error: 路径规格 'src' 未匹配任何 git 已知文件
/home/zhenai/Java/AK/Akarin/Tuinity
rm: 无法删除 'src/net/minecraft/server/*.java': 没有那个文件或目录
cp: 无法获取'/home/zhenai/Java/AK/Akarin/Tuinity/Paper/work/Minecraft/1.15.2/spigot/net/minecraft/server/*.java' 的文件状态(stat): 没有那个文件或目录
/bin/ls: 无法访问 '/home/zhenai/Java/AK/Akarin/Tuinity/Paper/Paper-Server/src/main/java/net/minecraft/server': 没有那个文件或目录
error: 路径规格 '.' 未匹配任何 git 已知文件
Tagging as 1.15.2--9ce64372ea7c9cce8774595a3129324013b13706
Paper: f65f95ce3 Do not let the server load chunks from newer versions
mc-dev:
scripts/upstream.sh: 第 44 行: cd: Paper-API: 没有那个文件或目录
scripts/upstream.sh: 第 44 行: cd: Paper-Server: 没有那个文件或目录
/home/zhenai/Java/AK/Akarin/Tuinity
Rebuilding Forked projects.... 
Importing MC-DEV
/home/zhenai/Java/AK/Akarin/Tuinity
./scripts/importmcdev.sh: 第 68 行: cd: Paper/Paper-Server/: 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
cat: 'patches/server/*': 没有那个文件或目录
./scripts/importmcdev.sh: 第 113 行: cd: Paper/Paper-Server/: 没有那个文件或目录
fatal: 路径规格 'src' 未匹配任何文件
error: 路径规格 'src' 未匹配任何 git 已知文件
scripts/apply.sh: 第 38 行: cd: /home/zhenai/Java/AK/Akarin/Tuinity/Paper/Paper-API: 没有那个文件或目录
正在获取 origin
Resetting Tuinity-API to Paper-API...
切换到一个新分支 'master'
fatal: 有歧义的参数 'upstream/upstream':未知的版本或路径不存在于工作区中。
使用 '--' 来分隔版本和路径,例如:
'git <命令> [<版本>...] -- [<文件>...]'
  Applying patches to Tuinity-API...
应用:Tuinity POM Changes
error: invalid object 100644 20c473f521e50df57065d3644398f9db777c1a24 for 'pom.xml'
error: 仓库缺乏必要的数据对象以进行三方合并。
打补丁失败于 0001 Tuinity POM Changes
提示:用 'git am --show-current-patch=diff' 命令查看失败的补丁
当您解决这一问题,执行 "git am --continue"。
如果您想要跳过这一补丁,则执行 "git am --skip"。
若要复原至原始分支并停止补丁操作,执行 "git am --abort"。
  Something did not apply cleanly to Tuinity-API.
  Please review above details and finish the apply then
  save the changes with rebuildPatches.sh
Failed to apply patches
josephworks commented 2 years ago

Could you tell me the output of ./gradlew -version

zhenaiwork commented 2 years ago

not hava gradlew document

josephworks commented 2 years ago

Then please do gradle version

zhenaiwork commented 2 years ago

How to do it

josephworks commented 2 years ago

I’m sorry, I don’t quite understand what you are trying to say. How are you building akarin?

zhenaiwork commented 2 years ago

git clone https://github.com/Akarin-project/Akarin git submodule update --remote ./akarin asr

zhenaiwork commented 2 years ago

$ gradle version
------------------------------------------------

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Task 'version' not found in root project 'Akarin'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
josephworks commented 2 years ago

$ gradle version

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong: Task 'version' not found in root project 'Akarin'.

  • Try: Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s

Please use gradle -version

zhenaiwork commented 2 years ago

------------------------------------------------------------
Gradle 7.2
------------------------------------------------------------

Build time:   2021-08-17 09:59:03 UTC
Revision:     a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin:       1.5.21
Groovy:       3.0.8
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          17.0.2 (Private Build 17.0.2+8-Ubuntu-120.04)
OS:           Linux 5.13.0-35-generic amd64
zhenaiwork commented 2 years ago

Still not working, same error

./akarin jar


------------------------------------------------------------
Gradle 7.2
------------------------------------------------------------

Build time:   2021-08-17 09:59:03 UTC
Revision:     a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin:       1.5.21
Groovy:       3.0.8
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_312 (Private Build 25.312-b07)
OS:           Linux 5.13.0-35-generic amd64
josephworks commented 2 years ago

How are you switching the Java version between 17 and 8

zhenaiwork commented 2 years ago

I built from scratch using java8 and it built successfully, thanks for your help

josephworks commented 2 years ago

Great! Does that mean the issue is solved?

zhenaiwork commented 2 years ago

yes