zoukankan      html  css  js  c++  java
  • springboot版本升级问题 IncompatibleClassChangeError: null

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'companyCalibrateController': Unsatisfied dependency expressed through field 'companyCalibrateService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'companyCalibrateServiceImpl': Unsatisfied dependency expressed through field 'companyCalibrateDetailDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyCalibrateDetailDao' defined in com.xxx.datalake.sjhx.repository.CompanyCalibrateDetailDao defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$188/2038185019.getObject(Unknown Source) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at com.xxx.datalake.sjhx.SjhxApp.main(SjhxApp.java:72) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'companyCalibrateServiceImpl': Unsatisfied dependency expressed through field 'companyCalibrateDetailDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyCalibrateDetailDao' defined in com.xxx.datalake.sjhx.repository.CompanyCalibrateDetailDao defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$188/2038185019.getObject(Unknown Source) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ... 18 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyCalibrateDetailDao' defined in com.xxx.datalake.sjhx.repository.CompanyCalibrateDetailDao defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1794) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$188/2038185019.getObject(Unknown Source) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ... 32 common frames omitted Caused by: java.lang.IncompatibleClassChangeError: null at org.springframework.data.jpa.util.JpaMetamodel.lambda$isSingleIdAttribute$4(JpaMetamodel.java:94) at org.springframework.data.jpa.util.JpaMetamodel$$Lambda$734/1397766206.test(Unknown Source) at java.util.Optional.filter(Optional.java:178) at org.springframework.data.jpa.util.JpaMetamodel.isSingleIdAttribute(JpaMetamodel.java:94) at org.springframework.data.jpa.mapping.JpaPersistentPropertyImpl.lambda$new$2(JpaPersistentPropertyImpl.java:110) at org.springframework.data.jpa.mapping.JpaPersistentPropertyImpl$$Lambda$724/1878226312.get(Unknown Source) at org.springframework.data.util.Lazy.getNullable(Lazy.java:212) at org.springframework.data.util.Lazy.get(Lazy.java:94) at org.springframework.data.jpa.mapping.JpaPersistentPropertyImpl.isIdProperty(JpaPersistentPropertyImpl.java:141) at org.springframework.data.jpa.mapping.JpaPersistentEntityImpl.returnPropertyIfBetterIdPropertyCandidateOrNull(JpaPersistentEntityImpl.java:72) at org.springframework.data.jpa.mapping.JpaPersistentEntityImpl.returnPropertyIfBetterIdPropertyCandidateOrNull(JpaPersistentEntityImpl.java:39) at org.springframework.data.mapping.model.BasicPersistentEntity.addPersistentProperty(BasicPersistentEntity.java:218) at org.springframework.data.mapping.context.AbstractMappingContext$PersistentPropertyCreator.createAndRegisterProperty(AbstractMappingContext.java:552) at org.springframework.data.mapping.context.AbstractMappingContext$PersistentPropertyCreator.doWith(AbstractMappingContext.java:520) at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:705) at org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:389) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:263) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:206) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:90) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$4(RepositoryFactoryBeanSupport.java:295) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport$$Lambda$670/825378819.accept(Unknown Source) at java.util.Optional.ifPresent(Optional.java:159) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:295) at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:121) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790) ... 43 common frames omitted
    springboot版本升级之后,出现如上错误。最后发现是jdk版本问题,开发机器上jdk版本1.8.0_20升级为1.8.0_281之后问题解决(1.8.0_100之后好像都可以)。
    hibernate-core版本对于jdk版本有一定的要求,5.4.26.Final 降级为 5.3.18.Final 也不会出现如上问题。

  • 相关阅读:
    搭建好lamp,部署owncloud。
    部署LAMP环境搭建一个网站论坛平台
    二进制编译安装httpd服务
    安装httpd服务并配置
    FTP的应用
    Linux配置IP,安装yum源
    RHEL-server-7.0-Linux-centos安装过程
    zabbix监控某一进程
    python获取windows系统的CPU信息。
    python相关cmdb系统
  • 原文地址:https://www.cnblogs.com/iiot/p/14421637.html
Copyright © 2011-2022 走看看