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.
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
为什么本地启动不了,它总是报反射错误,但是我jdk版本是对的
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @3a82ac97
Caused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @3a82ac97
java.lang.IllegalStateException: Cannot load configuration class: com.alibaba.csp.sentinel.dashboard.DashboardApplication
jdk版本1.8
java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @3a82ac97
这个看起来是 JDK 9+ 的版本,可否提供下具体版本
--add-opens java.base/java.lang=ALL-UNNAMED
看看还报不报错。 StackOverflow上有相关的讨论 https://stackoverflow.com/questions/41265266/how-to-solve-inaccessibleobjectexception-unable-to-make-member-accessible-m
It do solve my Dashboard problem ! 👍
For More Detail below :
My JDK Version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)
OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode, sharing)
My command Line
java -Dserver.port=9000 --add-opens java.base/java.lang=ALL-UNNAMED -jar sentinel-dashboard-1.8.2.jar
--add-opens java.base/java.lang=ALL-UNNAMED
看看还报不报错。 StackOverflow上有相关的讨论 https://stackoverflow.com/questions/41265266/how-to-solve-inaccessibleobjectexception-unable-to-make-member-accessible-m
It do solve my Dashboard problem ! 👍
For More Detail below :
My JDK Version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)
OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode, sharing)
My command Line
java -Dserver.port=9000 --add-opens java.base/java.lang=ALL-UNNAMED -jar sentinel-dashboard-1.8.2.jar
❯ java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment Corretto-8.312.07.1 (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM Corretto-8.312.07.1 (build 25.312-b07, mixed mode)
miozus ~
but switch JDK 17 -> 8 works for me
❯ java -jar "E:\Java\sentinel\sentinel-dashboard-1.8.0.jar" --server.port=8333
INFO: Sentinel log output type is: file
INFO: Sentinel log charset is: utf-8
INFO: Sentinel log base directory is: C:\Users\miozus\logs\csp\
INFO: Sentinel log name use pid is: false
...(success)