自己的项目升级后报错 换回原来的tools也一样报错

Blade 未结 2 3656
没有如果
没有如果 2019-06-11 19:39

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bladeFeignTargeter' defined in class path resource [org/springblade/core/cloud/feign/BladeFeignAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.openfeign.Targeter]: Factory method 'bladeFeignTargeter' threw exception; nested exception is java.lang.IllegalAccessError: tried to access class org.springframework.cloud.openfeign.Targeter from class org.springblade.core.cloud.feign.BladeFeignAutoConfiguration$$EnhancerBySpringCGLIB$$689903f6

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1305)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1144)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)

at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139)

at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:50)

at org.springblade.customer.info.CustomerInfoApplication.main(CustomerInfoApplication.java:34)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.openfeign.Targeter]: Factory method 'bladeFeignTargeter' threw exception; nested exception is java.lang.IllegalAccessError: tried to access class org.springframework.cloud.openfeign.Targeter from class org.springblade.core.cloud.feign.BladeFeignAutoConfiguration$$EnhancerBySpringCGLIB$$689903f6

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)

... 24 common frames omitted

Caused by: java.lang.IllegalAccessError: tried to access class org.springframework.cloud.openfeign.Targeter from class org.springblade.core.cloud.feign.BladeFeignAutoConfiguration$$EnhancerBySpringCGLIB$$689903f6

at org.springblade.core.cloud.feign.BladeFeignAutoConfiguration$$EnhancerBySpringCGLIB$$689903f6.bladeFeignTargeter()

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)

... 25 common frames omitted



Process finished with exit code 1


2条回答
  •  admin
    admin (楼主)
    2019-06-12 09:07

    1. 不能把bladex-tool与bladex等工程放在同一个idea窗口,需要分开,一个项目一个窗口

    2. x-tool和bladex都删掉devtools试试

    image.png


提交回复