-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Norbert Schneider opened SPR-6000 and commented
If JdbcTemplate.update is executed with a null value it throws an exception in the Derby Client driver:
org.apache.derby.client.am.SqlException: Es wurde versucht, einen Datenwert des Typs '<UNKNOWN>' aus einem Datenwert des Typs 'BIGINT' abzurufen.
org.apache.derby.client.am.PreparedStatement$PossibleTypes.throw22005Exception(Unknown Source)
org.apache.derby.client.am.PreparedStatement.setNull(Unknown Source)
org.springframework.jdbc.core.StatementCreatorUtils.setNull(StatementCreatorUtils.java:247)
org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal(StatementCreatorUtils.java:214)
org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUtils.java:145)
org.springframework.jdbc.core.ArgPreparedStatementSetter.setValues(ArgPreparedStatementSetter.java:51)
org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:796)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792)
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850)
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:858)
org.springframework.security.acls.jdbc.JdbcMutableAclService.updateObjectIdentity(JdbcMutableAclService.java:376)
org.springframework.security.acls.jdbc.JdbcMutableAclService.updateAcl(JdbcMutableAclService.java:334)
In org.springframework.jdbc.core.StatementCreatorUtils.setNull, the current driver name get compared against some predefined names and the null value is set appropriately. There is already a comparison against "Apache Derby Embedded". I suggest changing it to "Apache Derby", this works fine in my case.
Affects: 2.5.6
Referenced from: commits 84c1b56