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.Dismiss alert
example-nacos启动时报错:
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 @3a52dba3
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[na:na]
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[na:na]
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193) ~[na:na]
at net.sf.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61) ~[cglib-3.3.0.jar:na]
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) ~[na:na]
at net.sf.cglib.core.ReflectUtils.(ReflectUtils.java:52) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:332) ~[cglib-3.3.0.jar:na]
... 63 common frames omitted
然后自己搜了一下解决方案,给SpringApplication加了VM option:--add-opens java.base/java.lang=ALL-UNNAMED,再次启动报另一个错误:
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:195) ~[asm-7.1.jar:7.1]
at org.objectweb.asm.ClassReader.(ClassReader.java:176) ~[asm-7.1.jar:7.1]
at org.objectweb.asm.ClassReader.(ClassReader.java:162) ~[asm-7.1.jar:7.1]
at org.objectweb.asm.ClassReader.(ClassReader.java:283) ~[asm-7.1.jar:7.1]
at net.sf.cglib.core.DuplicatesPredicate.(DuplicatesPredicate.java:93) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.getMethods(Enhancer.java:557) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:575) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:332) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.generate(Enhancer.java:492) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54) ~[cglib-3.3.0.jar:na]
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
at net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:294) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:480) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:324) ~[cglib-3.3.0.jar:na]
at org.dromara.dynamictp.common.plugin.DtpInterceptorProxyFactory.enhance(DtpInterceptorProxyFactory.java:52) ~[classes/:na]
at org.dromara.dynamictp.common.plugin.DtpInterceptor.plugin(DtpInterceptor.java:54) ~[classes/:na]
at org.dromara.dynamictp.common.plugin.DtpInterceptorRegistry.plugin(DtpInterceptorRegistry.java:94) ~[classes/:na]
at org.dromara.dynamictp.core.spring.DtpPostProcessor.registerAndReturnDtp(DtpPostProcessor.java:106) ~[classes/:na]
at org.dromara.dynamictp.core.spring.DtpPostProcessor.postProcessAfterInitialization(DtpPostProcessor.java:94) ~[classes/:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:434) ~[spring-beans-6.0.12.jar:6.0.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1773) ~[spring-beans-6.0.12.jar:6.0.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598) ~[spring-beans-6.0.12.jar:6.0.12]
... 42 common frames omitted
首先感谢您使用 DynamicTp,如果使用过程中有任何问题,请按照下述模板反馈问题,建议使用 Markdown 语法。
版本信息
问题描述
example-nacos启动时报错:
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 @3a52dba3
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[na:na]
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[na:na]
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193) ~[na:na]
at net.sf.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61) ~[cglib-3.3.0.jar:na]
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) ~[na:na]
at net.sf.cglib.core.ReflectUtils.(ReflectUtils.java:52) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:332) ~[cglib-3.3.0.jar:na]
... 63 common frames omitted
然后自己搜了一下解决方案,给SpringApplication加了VM option:--add-opens java.base/java.lang=ALL-UNNAMED,再次启动报另一个错误:
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
at org.objectweb.asm.ClassReader.(ClassReader.java:195) ~[asm-7.1.jar:7.1]
at org.objectweb.asm.ClassReader.(ClassReader.java:176) ~[asm-7.1.jar:7.1]
at org.objectweb.asm.ClassReader.(ClassReader.java:162) ~[asm-7.1.jar:7.1]
at org.objectweb.asm.ClassReader.(ClassReader.java:283) ~[asm-7.1.jar:7.1]
at net.sf.cglib.core.DuplicatesPredicate.(DuplicatesPredicate.java:93) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.getMethods(Enhancer.java:557) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:575) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:332) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.generate(Enhancer.java:492) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54) ~[cglib-3.3.0.jar:na]
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
at net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:294) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:480) ~[cglib-3.3.0.jar:na]
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:324) ~[cglib-3.3.0.jar:na]
at org.dromara.dynamictp.common.plugin.DtpInterceptorProxyFactory.enhance(DtpInterceptorProxyFactory.java:52) ~[classes/:na]
at org.dromara.dynamictp.common.plugin.DtpInterceptor.plugin(DtpInterceptor.java:54) ~[classes/:na]
at org.dromara.dynamictp.common.plugin.DtpInterceptorRegistry.plugin(DtpInterceptorRegistry.java:94) ~[classes/:na]
at org.dromara.dynamictp.core.spring.DtpPostProcessor.registerAndReturnDtp(DtpPostProcessor.java:106) ~[classes/:na]
at org.dromara.dynamictp.core.spring.DtpPostProcessor.postProcessAfterInitialization(DtpPostProcessor.java:94) ~[classes/:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:434) ~[spring-beans-6.0.12.jar:6.0.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1773) ~[spring-beans-6.0.12.jar:6.0.12]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598) ~[spring-beans-6.0.12.jar:6.0.12]
... 42 common frames omitted
The text was updated successfully, but these errors were encountered: