cancel
Showing results for 
Search instead for 
Did you mean: 

Getting java: cannot access org.springframework.http.HttpStatusCode

former_member796359
Discoverer
0 Kudos

Hello Colleagues,

We have a SAP Cap Java application in DwC. We are migrating to CAP 2.0.2. For that we have to update Spring boot to 3.0.0.

While doing so we get issue as java: cannot access org.springframework.http.HttpStatusCode when we are trying to access:-

.onStatus(status -> status.value() == HttpStatus.BAD_REQUEST.value(),

We get compile time issue as we are not able to access status.value() -> which we are getting from org.springframework.http.HttpStatusCode.

Implicitly its taking sprin-web-5.3.29 from the parent lib.

If we explicitly include it in pom file with sprin-web-6.0.11 then the compile time issue is resolved. But we get runtime issue as : Exception in thread "main" java.lang.NoSuchMethodError: 'org.springframework.core.io.support.SpringFactoriesLoader org.springframework.core.io.support.SpringFactoriesLoader.forDefaultResourceLocation(java.lang.ClassLoader)'

Is there any dependency that we are missing?

Thanks & Regards,

Nikita

Accepted Solutions (0)

Answers (0)