org.springframework.dao.TypeMismatchDataAccessException: Type mismatch affecting row number 0 and column type 'NUMBER': Value [2] is of type [java.lang.Integer] and cannot be converted to required type [int]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Spring JIRA by Ian Brandt, 1 year ago
Type mismatch affecting row number 0 and column type 'NUMBER': Value [2] is of type [java.lang.Integer] and cannot be converted to required type [int]
via Spring JIRA by Ian Brandt, 1 year ago
Type mismatch affecting row number 0 and column type 'NUMBER': Value [2] is of type [java.lang.Integer] and cannot be converted to required type [int]
org.springframework.dao.TypeMismatchDataAccessException: Type mismatch affecting row number 0 and column type 'NUMBER': Value [2] is of type [java.lang.Integer] and cannot be converted to required type [int]
at org.springframework.jdbc.core.SingleColumnRowMapper.mapRow(SingleColumnRowMapper.java:98)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60)
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:446)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:456)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:464)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:472)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.