log4jdbc-log4j2-jdbc4 logging error ResultSet.isClosed

406 views Asked by At

I am using log4j2, and I added "log4jdbc-log4j2-jdbc4" library to express the sql query statement log, but there is an error at runtime.

System Specifications:

  1. jdk1.6
  2. log4j2.3.2
  3. slf4j-api 1.7.12

What I did:

  • Add jar to maven

    org.bgee.log4jdbc-log4j2 log4jdbc-log4j2-jdbc4 1.16
  • Change settings

  • Add log4jdbc.log4j2.properties

    log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator log4jdbc.dump.sql.maxlinelength=0

  • Add logger to log4j2.xml (jdbc.resultset also causes an error when setting the level to DEBUG.)

The following error occurs when displaying the resultSet.

enter image description here

It worked normally for other small projects using the same DB! I have no idea which part is causing the error. I need help. Thanks!

1

There are 1 answers

0
happygreen17 On

It was an error caused by the presence of both ojdbc6 and ojdbc14 in the development environment.