Results 1 to 2 of 2

Thread: StatementCreatorUtils.setNull(...) in 3.1.2+ jdbc module LOGGING problem

  1. #1
    Join Date
    Oct 2012
    Posts
    1

    Default 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    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).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •