Skip to content

Unecessary logging about setNull with Oracle driver [SPR-11017] #15645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Oct 22, 2013 · 2 comments
Closed
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Oct 22, 2013

Oleksandr Gavenko opened SPR-11017 and commented

This logging output shown more than any words:

14:40:48.525 DEBUG org.hibernate.SQL
  Caller+0	 at org.hibernate.engine.jdbc.spi.SqlStatementLogger.logStatement(SqlStatementLogger.java:104)
  => 
    update
        DATA_24 
    set
        ...
    where
        ROWID = ?
.....
14:40:48.545 TRACE org.springframework.jdbc.core.StatementCreatorUtils
  Caller+0	 at org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal(StatementCreatorUtils.java:206)
  => Setting SQL statement parameter value: column index 7, parameter value [null], value class [null], SQL type unknown
14:40:48.606 DEBUG org.springframework.jdbc.core.StatementCreatorUtils
  Caller+0	 at org.springframework.jdbc.core.StatementCreatorUtils.setNull(StatementCreatorUtils.java:234)
  => JDBC 3.0 getParameterType call not supportedjava.sql.SQLException: Unsupported feature
	at oracle.jdbc.driver.OracleParameterMetaData.getParameterType(OracleParameterMetaData.java:166) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
	at org.springframework.jdbc.core.StatementCreatorUtils.setNull(StatementCreatorUtils.java:231) [spring-jdbc-3.2.4.RELEASE.jar:3.2.4.RELEASE]
....

Related bugs:

#14818
#15018
#10668

fixed but dumping a long trace from OracleParameterMetaData.getParameterType is unnecessary because of stupid logging logic of StatementCreatorUtils.setNull

My logback logging settings:

<logger level="trace" name="org.springframework.jdbc.core"/>
<logger level="trace" name="org.hibernate.type"/>
<logger level="trace" name="org.springframework.jdbc.core"/>

Affects: 3.2.4

@spring-projects-issues
Copy link
Collaborator Author

Phil Webb commented

It's not entirely clear to me what issue you have here, why do you feel that the logging is unnecessary and what are you proposing as an alternative?

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Oct 24, 2013

Juergen Hoeller commented

Coincidentally, this has been fixed for 4.0 RC1 and 3.2.5 already, following a recent discussion triggered by #14818. We're logging a single debug line with the exception type and message now but no stacktrace anymore.

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug in: data Issues in data modules (jdbc, orm, oxm, tx) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.2.5 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants