Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete org.springframework.core.NestedIOException #28198

Closed
sbrannen opened this issue Mar 18, 2022 · 2 comments
Closed

Remove obsolete org.springframework.core.NestedIOException #28198

sbrannen opened this issue Mar 18, 2022 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

Spring's custom org.springframework.core.NestedIOException is obsolete and can be replaced with standard IOException usage.

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Mar 18, 2022
@sbrannen sbrannen added this to the 6.0.0-M4 milestone Mar 18, 2022
@sbrannen sbrannen self-assigned this Mar 18, 2022
artembilan added a commit to spring-projects/spring-integration that referenced this issue Mar 18, 2022
Related to spring-projects/spring-framework#28198

Replaces its usage with the standard `IOException`
which has supported a root cause since Java 6.
artembilan pushed a commit to spring-projects/spring-amqp that referenced this issue Mar 18, 2022
Related to spring-projects/spring-framework#28198

Replaces its usage with the standard `IOException`
which has supported a root cause since Java 6.
@jingxiang
Copy link

Why not mark as Deprecated ?
As far as I know, this class involves many downstream dependencies, and direct deletion may lead to the unavailability of many frameworks.
For example:mybatis-spring-boot:2.2.2

Caused by: java.lang.NoClassDefFoundError: org/springframework/core/NestedIOException at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.sqlSessionFactory(MybatisAutoConfiguration.java:141) at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$fde06b8c.CGLIB$sqlSessionFactory$2(<generated>) at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$fde06b8c$$FastClassBySpringCGLIB$$8baa1e6e.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)

@snicoll
Copy link
Member

snicoll commented Aug 5, 2022

@jingxiang this is a good point, NestedIOException should have been marked as deprecated in 5.3.x. I've created #28929. If you're working on mybatis, please update the code to catch IOException directly. If you don't, can you please create an issue to notify them? Thanks!

j-sandy added a commit to j-sandy/kork that referenced this issue Dec 11, 2024
…g upgrade of spring boot 3.0.x

While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors during build process of kork-crypto module:
```
> Task :kork-crypto:compileJava FAILED
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:20: error: cannot find symbol
import org.springframework.core.NestedIOException;
                               ^
  symbol:   class NestedIOException
  location: package org.springframework.core
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:22: error: cannot find symbol
public class NestedSecurityIOException extends NestedIOException {
                                               ^
  symbol: class NestedIOException
2 errors
```
The root cause is the removal of `org.springframework.core.NestedIOException` from springframework 6.0, as mentioned in the below links:
spring-projects/spring-framework#28198
spring-projects/spring-framework#28929
So, replacing `org.springframework.core.NestedIOException` with `java.io.IOException`.
j-sandy added a commit to j-sandy/kork that referenced this issue Dec 17, 2024
…g upgrade of spring boot 3.0.x

While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors during build process of kork-crypto module:
```
> Task :kork-crypto:compileJava FAILED
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:20: error: cannot find symbol
import org.springframework.core.NestedIOException;
                               ^
  symbol:   class NestedIOException
  location: package org.springframework.core
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:22: error: cannot find symbol
public class NestedSecurityIOException extends NestedIOException {
                                               ^
  symbol: class NestedIOException
2 errors
```
The root cause is the removal of `org.springframework.core.NestedIOException` from springframework 6.0, as mentioned in the below links:
spring-projects/spring-framework#28198
spring-projects/spring-framework#28929
So, replacing `org.springframework.core.NestedIOException` with `java.io.IOException`.
j-sandy added a commit to j-sandy/kork that referenced this issue Dec 19, 2024
…g upgrade of spring boot 3.0.x

While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors during build process of kork-crypto module:
```
> Task :kork-crypto:compileJava FAILED
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:20: error: cannot find symbol
import org.springframework.core.NestedIOException;
                               ^
  symbol:   class NestedIOException
  location: package org.springframework.core
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:22: error: cannot find symbol
public class NestedSecurityIOException extends NestedIOException {
                                               ^
  symbol: class NestedIOException
2 errors
```
The root cause is the removal of `org.springframework.core.NestedIOException` from springframework 6.0, as mentioned in the below links:
spring-projects/spring-framework#28198
spring-projects/spring-framework#28929
So, replacing `org.springframework.core.NestedIOException` with `java.io.IOException`.
j-sandy added a commit to j-sandy/kork that referenced this issue Dec 19, 2024
…g upgrade of spring boot 3.0.x

While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors during build process of kork-crypto module:
```
> Task :kork-crypto:compileJava FAILED
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:20: error: cannot find symbol
import org.springframework.core.NestedIOException;
                               ^
  symbol:   class NestedIOException
  location: package org.springframework.core
/kork/kork-crypto/src/main/java/com/netflix/spinnaker/kork/crypto/NestedSecurityIOException.java:22: error: cannot find symbol
public class NestedSecurityIOException extends NestedIOException {
                                               ^
  symbol: class NestedIOException
2 errors
```
The root cause is the removal of `org.springframework.core.NestedIOException` from springframework 6.0, as mentioned in the below links:
spring-projects/spring-framework#28198
spring-projects/spring-framework#28929
So, replacing `org.springframework.core.NestedIOException` with `java.io.IOException`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants