Home > Back-end >  IllegalAccessError after moving from spring boot 2.4.6 to 2.5.4
IllegalAccessError after moving from spring boot 2.4.6 to 2.5.4

Time:09-29

I am trying to upgrade from spring boot 2.4.6 to 2.5.4 and have started receiving following error

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2021-09-28 14:10:37 [main] ERROR o.s.boot.SpringApplication - Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'supplierInitializer' defined in class path resource [org/springframework/cloud/stream/function/FunctionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'inMemorySwaggerResourcesProvider_integrationflow.org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'integrationGlobalProperties' defined in class path resource [org/springframework/boot/autoconfigure/integration/IntegrationAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.integration.context.IntegrationProperties]: Factory method 'integrationGlobalProperties' threw exception; nested exception is java.lang.IllegalAccessError: class org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration tried to access private method 'void org.springframework.integration.context.IntegrationProperties.()' (org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration and org.springframework.integration.context.IntegrationProperties are in unnamed module of loader 'app')

Not able to understand what has changed in spring boot 2.5.X , although upgrading till version 2.4.11 works fine.

CodePudding user response:

I guess you have an old version of spring-integration-core library. Delete all the folders under .m2/repository/org/springframework/integration. That should fix it.

  • Related