2015-11-19 20 views
5

嗨,我刚刚升级到春季启动1.3.0.RELEASE同时运行相同的再次得到这个奇怪的错误问题与春天开机的时候升级到1.3.0.RELEASE

14:43:52.503 [main] INFO c.test.whf.service.HfServices - Starting up.... 
Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.springframework.core.convert.support.DefaultConversionService.addCollectionConverters(Lorg/springframework/core/convert/converter/ConverterRegistry;)V from class org.springframework.boot.bind.RelaxedConversionService 
    at org.springframework.boot.bind.RelaxedConversionService.<init>(RelaxedConversionService.java:52) 
    at org.springframework.boot.bind.RelaxedDataBinder.modifyProperties(RelaxedDataBinder.java:148) 
    at org.springframework.boot.bind.RelaxedDataBinder.doBind(RelaxedDataBinder.java:128) 
    at org.springframework.validation.DataBinder.bind(DataBinder.java:715) 
    at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:267) 
    at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:240) 
    at org.springframework.boot.context.config.ConfigFileApplicationListener.bindToSpringApplication(ConfigFileApplicationListener.java:220) 
    at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:171) 
    at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:161) 
    at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:146) 
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163) 
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136) 
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:119) 
    at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:111) 
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:65) 
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) 
    at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:315) 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:295) 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112) 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101) 
    at com.wellmanage.whf.service.HfServices.main(HfServices.java:97) 

还没有出现过其他更改我的代码不知道是什么导致这真的。

应用类是如下

SpringApplication.run(HfServices.class, args); 

请帮助那样简单......

+2

我有同样的错误,而使用Spring 1.3.0引导和Spring 4.2.2。升级到Spring 4.2.3为我修复了它。 – FVlad

回答

12

,在Spring框架中添加方法和你在你的项目中明确重写版本。 不要那样做!

Spring Boot正在为您管理,您应该真的让它确定要使用的Spring Framework版本。

+1

感谢Stephane为此我放了4.2.2,因为修补程序(在里程碑1.3.0版本中工作)在该版本中发布,所以现在我们应该让Spring引导在底层Spring框架上指定版本? –

+2

它总是如此。如果你需要一个_newer_版本(就像你做的那样),那很好,但是一旦你升级了Spring Boot,你必须记住删除这个覆盖,并让Spring Boot再次选择它。该方法被添加在4.2.3 –

+0

ahh好的感谢似乎有一些变化已经进入logback,现在我的运行失败的一些logback问题让我检查和解决.. –

0

我也收到了这个错误。我们目前正在WebLogic中运行我们的应用程序,并计划迁移到云中,以便使它们能够使用Spring Boot运行。 要解决它,我需要把它添加到Web应用程序/ WEB-INF/weblogic.xml中:

<wls:container-descriptor> 
    <wls:prefer-application-packages> 
     <wls:package-name>org.springframework.*</wls:package-name>    
    </wls:prefer-application-packages> 
</wls:container-descriptor>