question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InaccessibleObjectException on startup with Java 16

See original GitHub issue
[11:25:38] [Server thread/INFO]: [helper] Loading helper v5.6.7
[11:25:38] [Server thread/INFO]: [helper] helper (me.lucko.helper) bound to plugin helper - me.lucko.helper.internal.StandalonePlugin
[11:25:38] [Server thread/ERROR]: [org.bukkit.craftbukkit.v1_16_R3.CraftServer] null initializing helper v5.6.7 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
        at me.lucko.helper.plugin.ExtendedJavaPlugin.onLoad(ExtendedJavaPlugin.java:78) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:394) ~[patched_1.16.5.jar:git-Paper-629]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:252) ~[patched_1.16.5.jar:git-Paper-629]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1065) ~[patched_1.16.5.jar:git-Paper-629]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-629]
        at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @6f514ac
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357) ~[?:?]
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
        at java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[?:?]
        at java.lang.reflect.Method.setAccessible(Method.java:193) ~[?:?]
        at me.lucko.helper.maven.LibraryLoader.<clinit>(LibraryLoader.java:51) ~[?:?]
        ... 6 more

Paper 1.16.5 #654 Java 16 (OpenJDK 64-Bit Server VM 16.0.1+9-Ubuntu-120.04) Host: Linux 5.4.0-29-generic (amd64)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
PepejHa4kercommented, May 17, 2021

@GeorgeV220, the solution has already been provided, see above

1reaction
GeorgeV220commented, May 17, 2021

Hey, you can always add --add-opens java.base/java.net=ALL-UNNAMED for my test server i’m using java --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED -Xms128M -Xmx4096M -Dterminal.jline=false -Dterminal.ansi=true -jar purpur.jar

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve "InaccessibleObjectException" of jdk16
java, I found cglib is trying to use "defineClass" of "sun.misc.Unsafe". Unfortunately, I can find that class but cannot find that method in...
Read more >
InaccessibleObjectException on startup with Java 16
InaccessibleObjectException on startup with Java 16. ... InaccessibleObjectException: Unable to make protected void java.net.URLClassLoader.
Read more >
Spring Boot application startup exception: java.lang.reflect ...
Explore how to solve the problem of java.lang.reflect.InaccessibleObjectException being thrown when a Spring Boot application starts.
Read more >
InaccessibleObjectException: Unable to make protected void ...
... but I am currently experiencing this error while running Java 16; ... The error was promptly resolved by adding the following startup...
Read more >
InaccessibleObjectException with OpenAPI 3 and Java 16 ...
[Solved]-InaccessibleObjectException with OpenAPI 3 and Java 16-Springboot. Search. score:0. I was curious and just created a Java 16 Spring Boot 2.5.2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found