while upgrading spring boots 1.4 from 1.5, - spring

showing error "Spring Boot application can't resolve the org.springframework.boot package" while upgrading from springboots 1.4 to 1.5.
how we will resolved

Related

Upgrade jersey from 2.3 to 3.04

I am upgrading jersey-bom to 3.0.4 from 2.35. I didn't change all namespaces to jakarta. from javax. as its only breaking after 3.1.x as per https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest3x/migration.html#mig-3.0.0-breaking-changes
I am getting the following errors -
java.lang.LinkageError: ClassCastException: attempting to castjar:file:/C:/Users/guptraka/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar!/javax/ws/rs/client/ClientBuilder.class to jar:file:/C:/Users/guptraka/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar!/javax/ws/rs/client/ClientBuilder.class
at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:97)
at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:114)
at com.**.rpc.jersey.InvokerClient.<init>(InvokerClient.java:145)
at com.**.rpc.jersey.InvokerClient.createProxy(InvokerClient.java:72)
at com.**.service.util.InvokerClientFactory.createProxy(InvokerClientFactory.java:39)
at com.**.service.util.InvokerClientFactoryTest.shouldCreateProxy(InvokerClientFactoryTest.java:34)

Module was compiled with an incompatible version of Kotlin error after upgrading spring_cloud.version to 2021.0.0

I am attempting to update the spring cloud dependency from spring_cloud.version=2020.0.3
to spring_cloud.version=2021.0.0.
This causes an error when running the gradle build due to the following error
> Task :dispute-visa:compileKotlin FAILED
e: /Users/my.name/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-function-context/3.2.1/3b1b11733424ba90bd0b030a924e6b7deb2ff845/spring-cloud-function-context-3.2.1.jar!/META-INF/spring-cloud-function-context.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.2.
/Users/my.name/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-function-context/3.2.1/3b1b11733424ba90bd0b030a924e6b7deb2ff845/spring-cloud-function-context-3.2.1.jar!/META-INF/spring-cloud-function-context.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.2.
The spring cloud dependency is implementation("org.springframework.cloud:spring-cloud-stream-binder-kafka")
If this spring cloud dependency is removed then the build works.
If the spring cloud dependency is replaced with another spring cloud dependency then the build will fail with a similar error.
These are the relevent versions of other parts
kotlin.version=1.5.32
spring_boot.version=2.5.6
I have tried changing kotlin version and spring boot version with no effect.
Any help appreciated!

How to downgrade spring boot project from version 2.4 to 2.3?

Can you tell me the steps of downgrading spring boot project from 2.4 to 2.3?
Just change the version name in the pom.xml file from "2.4.1" to "2.3.1.RELEASE".

Spring core compatibilty issues with security and aop

Is there a specific version of spring core that is compatible with spring security and aop?
I tried these version but still getting error
org.springframework version : 4.0.3.RELEASE
org.springframework.security version : 3.2.0.RELEASE
error : missing CompositeUriComponentsContributor
org.springframework version : 4.0.3.RELEASE
org.springframework.security version : 4.0.3.RELEASE
error : missing AnnotationConfigRegistry
org.springframework version : 4.2.2.RELEASE
org.springframework.security version : 4.0.1.RELEASE
error : missing CorsProcessor
Reference documentation of Spring Security 4.0.4 states:
Spring Security builds against Spring Framework 4.2.5.RELEASE, but
should work with 4.0.x.
Releases of Spring Security are not aligned with releases of Spring Framework.
However, dependencies spring-core and spring-aop (both belonging to Spring Framework) should always be the same version.

Grails 1.2.1 with Spring 3.0.0 dependency problem under Jetty

Just moved to Grails 1.2.1 (used 1.1.1 before). Changed application.properties, ran grails upgrade, fixed BuildConfig and Bootstrap - everything works just fine from grails console.
However, getting a problem when deploy packaged war under jetty 6.1.22:
1581 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.setParameterNameDiscoverer(Lorg/springframework/core/ParameterNameDiscoverer;)V
My project is built with maven2. I researched the war dependencies and see that both spring 2.5.6 and 3.0.0.RELEASE are used there.
I then tried to suppress use of spring 2.5.6 and got a problem with Acegi plugin (using version 0.5.1):
2010-03-10 21:06:56.440:WARN::Nested in org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
Any help would be greatly appreciated.
The problem is caused by the fact that in new version of Spring
ConfigurableWebApplicationContext is located in spring-web.jar, but the interface it inherits ConfigurableApplicationContext, which contains setId(String) method is in located in spring-context.jar.
If you have a library which has been compiled against older version of spring-context it will fail with NoMethodFound exception.
The solution is to locate and recompile that library against latest Spring version.
If you are using Spring version below 3.0 you could try to put full Spring bundle Jar instead of separate packages.

Resources