为什么本地启动不了,它总是报反射错误,但是我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
3条答案
按热度按时间tf7tbtn21#
java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @3a82ac97
这个看起来是 JDK 9+ 的版本,可否提供下具体版本
brtdzjyr2#
sentinel-dashboard-1.8.2.jar
sentinel-dashboard-1.7.1.jar
sentinel-dashboard-1.7.0.jar
这三个版本的,我看官网说了只要Java6以上就行,不太想改根目录的jdk版本,会有冲突
zf2sa74q3#
感觉像是JDK 9+的问题,我用JDK 17的时候遇到了类似的问题。试试增加VM选项
看看还报不报错。
StackOverflow上有相关的讨论 https://stackoverflow.com/questions/41265266/how-to-solve-inaccessibleobjectexception-unable-to-make-member-accessible-m