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

Spring boot application breaks after upgrade to Neumann-RELEASE [DATAJDBC-543] #763

Closed
spring-projects-issues opened this issue May 12, 2020 · 6 comments
Assignees
Labels
in: repository status: declined type: bug

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented May 12, 2020

Krimarck opened DATAJDBC-543 and commented

After upgrade release train version to Neumann-RELEASE Spring application break. But with old release of Spring-data-jdbc (Moore-SR7) works fine.

The error stack shows class not found error at the end:

Caused by: java.lang.ClassNotFoundException: org.springframework.data.jdbc.repository.config.JdbcConfiguration
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_251]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_251]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) ~[na:1.8.0_251]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_251]
at java.lang.Class.forName0(Native Method) ~[na:1.8.0_251]
at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_251]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:285) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:325) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]
... 89 common frames omitted

 


Affects: 2.0 GA (Neumann)

Attachments:

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 13, 2020

Jens Schauder commented

We had to make some breaking changes with this release, hence the 2.0 version.

You are probably extending or importing JdbcConfiguration which got replaced by AbstractJdbcConfiguration which you should extend your custom Spring Data JDBC configuration from.

Please let us know if this solves your problem

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 13, 2020

Krimarck commented

No, i'm not extending any class. I upload a full test (if you run with Moore-SR7 works, but if you change to Neumann-RELEASE fails), i guess Spring boot must to be updated maybe

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 15, 2020

Jens Schauder commented

You are probably right about the need to use the new version Spring Boot. Since that got just released, could you give it a try?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 18, 2020

Krimarck commented

Upgrading to Spring Boot 2.3.0 apparently works, but now I get:

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.649 s <<< FAILURE! - in cl.kr.test.TestApp
[ERROR] cl.kr.test.TestApp.createNew Time elapsed: 0.436 s <<< ERROR!
org.springframework.jdbc.BadSqlGrammarException:
PreparedStatementCallback; bad SQL grammar [SELECT "sm_databases"."database_id" AS "database_id", "sm_databases"."database_name" AS "database_name" FROM "sm_databases"]; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Tabla "sm_databases" no encontrada
Table "sm_databases" not found; SQL statement:
....

 

I guess is because change in Spring Data Jdbc: "All SQL identifiers know get quoted by default.". How I can disable that behavior? (I could not found it in documentation)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 26, 2020

Krimarck commented

I think this bug can be close, when https://jira.spring.io/browse/DATAJDBC-548 is resolved

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 27, 2020

Jens Schauder commented

I closed this issue since the observed behaviour is what is currently intended.

DATAJDBC-548 will be the starting point of further discussion how to improve the developer experience.

For anybody seeing similar problems, please also see: https://spring.io/blog/2020/05/20/migrating-to-spring-data-jdbc-2-0

@spring-projects-issues spring-projects-issues added type: bug status: declined in: repository labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository status: declined type: bug
Projects
None yet
Development

No branches or pull requests

2 participants