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

org.h2.jdbc.JdbcSQLException: NULL nicht zulässig für Feld "xyz" gets translated to org.springframework.jdbc.UncategorizedSQLException [SPR-7480] #12138

Closed
spring-projects-issues opened this issue Aug 21, 2010 · 1 comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 21, 2010

Axel Fontaine opened SPR-7480 and commented

When trying to insert a NULL value into a NOT NULL column

H2 Returns org.h2.jdbc.JdbcSQLException: NULL nicht zulässig für Feld "xyz"
Spring translates it to org.springframework.jdbc.UncategorizedSQLException

On Oracle and HsqlDB, Spring correctly translates this case to org.springframework.dao.DataIntegrityViolationException


Affects: 3.0.4

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Axel Fontaine commented

The same also occurs with MySQL

MySQL returns java.sql.SQLException: Field 'xyz' doesn't have a default value
Spring translates it to org.springframework.jdbc.UncategorizedSQLException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant