Skip to content

NamedParameterJdbcTemplate for "insert / select" clause, set NULL value causes JConnect 7 (Sybase) problem - java.io.IOException: JZ0SL: Unsupported SQL type 0. - Affects 3.1.3.RELEASE, works in 3.1.1.RELEASE [SPR-10084] #14717

Closed
@spring-projects-issues

Description

@spring-projects-issues

David Boden opened SPR-10084 and commented

On a SQL query that involves:

insert into AbcTable
select :param1, :param2, otherValue
from DefTable

... using a NamedParameterJdbcTemplate and mapping one of the named parameters to NULL in the parameter map results in:
java.io.IOException: JZ0SL: Unsupported SQL type 0.

Example code (Spring 3.1.3.RELEASE):
MapSqlParameterSource parameters = new MapSqlParameterSource();
parameters.addValue("param1", null);
template.update(insertSql, parameters);

Works (inserts a null value into the table) in 3.1.1.RELEASE.

Using Sybase JConnect 7.07.ESD5 (latest) and other versions of JConnect spanning back 2 years.

Test details to follow on Monday, just wanted to raise the issue.


Affects: 3.1.3

Issue Links:

Referenced from: commits f449b5a, f0a1ff2

Backported to: 3.1.4

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions