当前位置: 首页 > 后端技术 > Java

AdoptOpenJDK引起的java.lang.NoClassDefFoundError问题

时间:2023-04-01 16:12:35 Java

AdoptOpenJDK-8u312b07在使用此版本JDK时出现以下问题:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'defaultValidator'definedinclasspathresource[org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]:init方法调用失败;嵌套异常是java.lang.NoClassDefFoundError:无法在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)处初始化类org.hibernate.validator.internal.engine.valueextraction.ValueExtractorManager~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)~[spring-beans-5.2.5.RELEASE。jar:5.2.5.RELEASE]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.beans。在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]在org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]在org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]在org.springframework.boot.SpringApplication.run(SpringApplication.java:315)~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]在org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]在org.github.helixcs.myspringboot.examples.c5.redis.JwtAppBootstrap.main(JwtAppBootstrap.java:18)[classes/:na]通过替换OracleJDK-1.88u271解决这个问题。

最新推荐
猜你喜欢