bladex4.3.0出现这样的错误

Blade 未结 1 25
心晴
心晴 剑圣 12小时前

org.springframework.cglib.core.ReflectUtils$2: No compatible defineClass mechanism detected: JVM should be started with --add-opens=java.base/java.lang=ALL-UNNAMED for ClassLoader.defineClass to be accessible. On the module path, you may not be able to define this CGLIB-generated class at all.    at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:547)    at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:371)    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.lambda$new$1(AbstractClassGenerator.java:107)    at org.springframework.cglib.core.internal.LoadingCache.lambda$createEntry$1(LoadingCache.java:52)    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)    at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:57)    at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:130)    at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:317)    at org.springblade.core.tool.beans.BladeBeanMap$BladeGenerator.create(BladeBeanMap.java:106)    at org.springblade.core.tool.beans.BladeBeanMap.create(BladeBeanMap.java:26)    at org.springblade.core.tool.utils.BeanUtil.toMap(BeanUtil.java:377)    at org.springblade.core.log.error.BladeErrorAttributes.getErrorAttributes(BladeErrorAttributes.java:64)    at org.springframework.boot.autoconfigure.web.servlet.error.AbstractErrorController.getErrorAttributes(AbstractErrorController.java:74)    at org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(BasicErrorController.java:100)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    at java.base/java.lang.reflect.Method.invoke(Method.java:568)    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)    at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)    at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:258)    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:183)    at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:415)    at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:373)    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:315)    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:132)    at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)    at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:256)    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:101)    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:395)    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)    at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)    at java.base/java.lang.Thread.run(Thread.java:840)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 @3af9c5b7    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)    at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)    at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)    at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:505)    ... 68 more

1条回答
提交回复