2015-11-19 21 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>