-
Oct 31st, 2012, 04:55 AM
#1
StatementCreatorUtils.setNull(...) in 3.1.2+ jdbc module LOGGING problem
Hello,
after upgrading to Spring 3.1.2 I noticed that log file (org.springframework.jdbc is set to DEBUG/TRACE) is full of:
TRACE org.springframework.jdbc.core.StatementCreatorUtil s:setParameterValueInternal - Setting SQL statement parameter value: column index 8, <b>parameter value [null], value class [null], SQL type unknown</b>
DEBUG org.springframework.jdbc.core.StatementCreatorUtil s:setNull - Could not check database or driver name
java.sql.SQLException: Unsupported feature
at oracle.jdbc.driver.OracleParameterMetaData.getPara meterType(OracleParameterMetaData.java:166)
....
when JdbcTemplate.update(String sql, Object... args) is used and "args" argument contains null values.
All works fine but is it some possibility to exclude those exceptions from log file without code changes (use of update(String sql, Object[] args, int[] argTypes) or SqlParameterValue)?
Why StatementCreatorUtils.setNull logs this kind of Exceptions and normally sets ps.setNull(paramIndex, Types.NULL)?
-
Oct 31st, 2012, 07:14 AM
#2
Please use [ code][/code ] tags when posting code/xm;/stacktraces that way they remain readable..
Also check again those aren't errors just trace/debug messages. To disable simply set the loglevel to info or warn for org.springframework.jdbc (or globally if you don't want trace, debug logging). (I suggest a read on applicatie logging in general).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules