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

[1.16.5] Error occurred when running jar file after compilation #225

Open
liups233 opened this issue Jun 5, 2022 · 5 comments
Open

[1.16.5] Error occurred when running jar file after compilation #225

liups233 opened this issue Jun 5, 2022 · 5 comments

Comments

@liups233
Copy link

liups233 commented Jun 5, 2022

Version: 1.16.5

My Compilation Operations

  • Install OpenJDK-11
  • Install Maven
  • Set http proxy in Maven settings.xml (I am in China)
  • Clone the "ver/1.16.5" branch
  • Update submodules
  • execute ./akarin jar
  • No error in compilation process

Error Information

$ java -jar akarin-1.16.5-launcher.jar

An expected class  org.apache.logging.log4j.core.impl.ThrowableProxy$CacheEntry was not found for preloading: org.apache.logging.log4j.core.impl.ThrowableProxy$CacheEntry
System Info: Java 11 (OpenJDK 64-Bit Server VM 11.0.15+10-Ubuntu-0ubuntu0.22.04.1) Host: Linux 5.15.0-35-generic (amd64)
Loading libraries, please wait...
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
java.lang.ExceptionInInitializerError
        at org.bukkit.craftbukkit.Main.main(Main.java:291)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.papermc.paperclip.Paperclip.main(Paperclip.java:58)
Caused by: java.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found.
        at org.apache.logging.log4j.LogManager.callerClass(LogManager.java:573)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:598)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:585)
        at net.minecraft.server.v1_16_R3.Main.<clinit>(Main.java:26)
        ... 6 more

Java Verison

openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode)

Output Jar File (split archives)

https://github.com/liups233/Akarin-jar

@liups233 liups233 changed the title Error occurred when running jar file after compilation [1.16.5] Error occurred when running jar file after compilation Jun 5, 2022
@josephworks
Copy link
Member

Please try with OpenJDK 8.

@liups233
Copy link
Author

liups233 commented Jun 5, 2022

Please try with OpenJDK 8.

It does run with Java 8, but the "Class not found" error still exists. No problem?
BTW, why cannot we use higher version of Java for a better performance

@ghost
Copy link

ghost commented Jun 6, 2022

I can confirm this issue, both in target/akarin-1.16.5-launcher.jar and Akarin-Server/target/akarin-1.16.5.jar, so it maybe something related to maven shade plugin?

@ghost
Copy link

ghost commented Jun 6, 2022

#215 this pr breaks something but I don't know how, can you build it with Java 8 and then run on Java 11? @liups233

@ghost
Copy link

ghost commented Jun 6, 2022

However I can build on windows, I don't know why it errors on ubuntu.

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