With spring loading when upgrading to version 1.3.0.RELEASE

Hi, I just upgraded to spring boot version 1.3.0.RELEASE and got this strange error again while working

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) 

also there were no other changes in my code, not sure if this really causes.

the application class is simple as shown below

  SpringApplication.run(HfServices.class, args); 

Please, help...

+5
source share
2 answers

This method has been added in the Spring Framework, and you are overriding the version explicitly in your project. Please, do not do that!

Spring Boot manages this for you, and you really should let it determine the version of the Spring Framework.

+12
source

I also got this error. We are currently launching our applications on WebLogic and are planning a migration to the cloud, which also allows them to be launched using Spring Boot. To fix this, I needed to add this to webapp / 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> 
0
source

Source: https://habr.com/ru/post/1236308/


All Articles