Skip to content

"Parameter metadata not available for the given statement" SQL Exception after upgrading to Spring 5.0 RC4 [SPR-15977] #20528

Closed
@spring-projects-issues

Description

@spring-projects-issues

Bogdan Dumitrescu opened SPR-15977 and commented

Scenario:

  • execute a prepared statement using JdbcTemplate inserting a row into MySQL 5.5:

jdbcTemplate.update("insert into users (id, name, description) values (?, ?, ?)", id, name, description);

  • condition to reproduce: one of the arguments of the prepared statement is null. The column definition in MySQL corresponding to the null argument accepts null values.

When trying to execute the above with Spring 5.0 RC4 we are getting a "java.sql.SQLException: Parameter metadata not available for the given statement".

The same code executes fine when using the 4.3.11.RELEASE of spring-jdbc.

Using version 5.1.44 of mysql-connector-java, we're seeing the same behaviour on the following MySQL versions:

Ver 14.14 Distrib 5.5.53
Ver 14.14 Distrib 5.7.18-15


Affects: 5.0 RC4

Attachments:

Issue Links:

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions