Announcement Announcement Module
Collapse
No announcement yet.
StatementCreatorUtils.setNull(...) in 3.1.2+ jdbc module LOGGING problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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)?

  • #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).

    Comment

    Working...
    X