hoyacom / log4jdbc-log4j2 Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/log4jdbc-log4j2
Automatically exported from code.google.com/p/log4jdbc-log4j2
What steps will reproduce the problem?
1. Call Statement.execute() with SQL: print 'test'
2. Nothing logs.
What is the expected output? What do you see instead?
I wrote a quick Java app to test what the following SQL would output with
Statement.getWarnings():
print 'test'
For a SQL Server 2012 database it prints:
test
For a Sybase 12.5 database it prints:
test
Please see the attached Java code. I obfuscated the connection details,
username and password.
I only have access to a SQL Server and Sybase database... not sure what other
databases would output.
What version of the product are you using? On what operating system?
log4jdbc-log4j2-jdbc4.1, version 1.16 on Windows 7
Please provide any additional information below.
I am using log4jdbc-log4j2 with Liquibase so I can see more details of what
happened during a update or rollback. What I really want to see is the output
of sql print statements (like the Output screen from a database tool). I found
that JDBC Statement.getWarnings() can be used to get SQL output:
http://dba.stackexchange.com/questions/44372/is-there-any-way-to-retrieve-messag
es-in-sql-server-through-jdbc
http://stackoverflow.com/questions/6434338/when-to-call-getwarnings-on-connectio
ns-statements-and-resultsets-with-jdbc
This feature could be activated with a system property similar to
log4jdbc.statement.warn, defaulted to false.
Original issue reported on code.google.com by [email protected]
on 3 Sep 2014 at 5:50
Attachments:
What steps will reproduce the problem?
1. Configure log4jdbc-log4j with OFF loggers
2. Execute high load with select queries on DataSourceSpy
3. look at profiler
What is the expected output? What do you see instead?
I expect NO CPU utilization by ResultSetSpy. But I see a lot of CPU grabbed by
ResultSetSpy
What version of the product are you using? On what operating system?
1.16
Please provide any additional information below.
It is due to redundant returnValue.toString() in
ResultSetSpy.reportAllReturns() method(ResultSetSpy.java:111). It needs to be
wrapped by condition and to be executed only if necessary.
Original issue reported on code.google.com by [email protected]
on 31 Jan 2014 at 9:44
Add constructors to improve configuration for DataSourceSpy for better Spring
usage:
<bean id="dataSourceSpied" class="...">
...
</bean>
<bean id="slf4jDelegator"
class="net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator"/>
<bean id="rdbmsSpecifics"
class="net.sf.log4jdbc.sql.rdbmsspecifics.OracleRdbmsSpecifics"/>
<bean id="dataSource" class="net.sf.log4jdbc.Log4jdbcProxyDataSource">
<constructor-arg ref="dataSourceSpied" />
<constructor-arg ref="slf4jDelegator" />
<constructor-arg ref="rdbmsSpecifics" />
</bean>
See attached patch.
Original issue reported on code.google.com by [email protected]
on 20 Dec 2013 at 12:23
Attachments:
What steps will reproduce the problem?
1. Execute and close a resultSet
What is the expected output? What do you see instead?
N/A
What version of the product are you using? On what operating system?
1.12 JDBC 4
Oracle 10g Driver
Please provide any additional information below.
"ResultSetSpy.close" closes the resultSet AND calls reportReturn which calls
resultSet.getMetaData. As the resultSet is closed, the driver throws an
exception
Original issue reported on code.google.com by [email protected]
on 19 Jun 2013 at 10:54
I have such error.
Caused by: java.lang.ClassNotFoundException:
net.sf.log4jdbc.Log4jdbcProxyDataSource
In log4jdbc-remix there was ProxyDataSource , in here, there is not. I cant
configure it in SPring.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2014 at 12:37
log4jdbc.debug.stack.prefix option as REGEX only work for log4j2
while using slf4j ,it still just the package prefix of the stack trace
Original issue reported on code.google.com by [email protected]
on 19 Aug 2013 at 9:02
What steps will reproduce the problem?
1. Just looking into net.sf.log4jdbc.sql.jdbcapi.DriverSpy
What is the expected output? What do you see instead?
During initialization, the class puts to debug typo: intialization instead of
initialization (twice).
Could you please fix it at modifying this file?
Thank you
Original issue reported on code.google.com by D.Barabash
on 15 Apr 2015 at 9:36
What steps will reproduce the problem?
1. Load a big table with a lot of data
2. Log everything with slf4j (logback)
3. ResultSetCollectorPrinter will produce an OutOfMemoryError
What is the expected output? What do you see instead?
No error is expected
What version of the product are you using? On what operating system?
1.16
Please provide any additional information below.
If the Slf4jSpyDelegate would check in its resultSetCollected method if the
info level is allowed, this would be no problem. The Slf4jSpyDelegate
.resultSetCollected should look similar to this:
@Override
public void resultSetCollected(ResultSetCollector resultSetCollector) {
if (resultSetTableLogger.isInfoEnabled()) {
String resultsToPrint = new ResultSetCollectorPrinter().getResultSetToPrint(resultSetCollector);
resultSetTableLogger.info(resultsToPrint);
}
}
Original issue reported on code.google.com by [email protected]
on 27 Jan 2015 at 2:50
What steps will reproduce the problem?
1.Set up spring @Scheduled method
2.Implements 'select count(1) from table'
3.Run jetty server
What is the expected output? What do you see instead?
Nothing. A NullPointerException.
What version of the product are you using? On what operating system?
1.15 - Linux Ubuntu 12.04.3 LTS
Please provide any additional information below.
Dec 5, 2013 7:44:33 PM
org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler handleError
SEVERE: Unexpected error occurred in scheduled task.
java.lang.NullPointerException
at net.sf.log4jdbc.sql.resultsetcollector.DefaultResultSetCollector.getColumnCount(DefaultResultSetCollector.java:99)
at net.sf.log4jdbc.sql.resultsetcollector.ResultSetCollectorPrinter.getResultSetToPrint(ResultSetCollectorPrinter.java:68)
at net.sf.log4jdbc.log.log4j2.Log4j2SpyLogDelegator.resultSetCollected(Log4j2SpyLogDelegator.java:388)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.reportAllReturns(ResultSetSpy.java:104)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.reportReturn(ResultSetSpy.java:192)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.next(ResultSetSpy.java:1983)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:91)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:651)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:589)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:639)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:664)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:704)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:179)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:185)
at batch.dao.AuthFilterBatchControlDAO.findByStatus(AuthFilterBatchControlDAO.java:111)
at batch.dao.AuthFilterBatchControlDAO$$FastClassByCGLIB$$f221660b.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)
at batch.dao.AuthFilterBatchControlDAO$$EnhancerByCGLIB$$1b511458.findByStatus(<generated>)
at batch.service.AuthFilterBatchControlService.findRunning(AuthFilterBatchControlService.java:87)
at batch.service.load.LoadService.finish(LoadService.java:77)
at batch.service.load.LoadService$$FastClassByCGLIB$$7bcce3c8.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:627)
at batch.service.load.LoadService$$EnhancerByCGLIB$$3daa0a42.finish(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Original issue reported on code.google.com by kauedb
on 6 Dec 2013 at 2:53
What steps will reproduce the problem?
1. For a query like "SELECT myTable.* FROM myTable"
2. do rs.getString("myTable.myColumn")
What is the expected output? What do you see instead?
We get an exception like this:
java.lang.RuntimeException: ResultSet.getXXX(colName): could not look up name
at net.sf.log4jdbc.sql.resultsetcollector.DefaultResultSetCollector.setColIndexFromGetXXXMethodParams(DefaultResultSetCollector.java:261)
at net.sf.log4jdbc.sql.resultsetcollector.DefaultResultSetCollector.methodReturned(DefaultResultSetCollector.java:197)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.reportAllReturns(ResultSetSpy.java:100)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.reportReturn(ResultSetSpy.java:192)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.getString(ResultSetSpy.java:2559)
What version of the product are you using? On what operating system?
log4jdbc-log4j2-jdbc3 version 1.16 on Windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 4 Feb 2014 at 5:48
What steps will reproduce the problem?
1. enable full logging
2. open a connection
3. call connection.commit or connection.rollback
What is the expected output? What do you see instead?
"commit" or "rollback" in accordance with invoked method
What version of the product are you using? On what operating system?
org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 17 Jul 2014 at 9:50
Probably,Db2RdbmsSpecifics implementation is not thread-safe.
Because SimpleDateFormat is not thread-safe...
public class Db2RdbmsSpecifics extends RdbmsSpecifics {
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(
"'TIMESTAMP('''yyyy-MM-dd HH:mm:ss.SSS''')'");
public Db2RdbmsSpecifics() {
super();
}
@Override
public String formatParameterObject(Object object) {
if (object instanceof Date) {
return DATE_FORMAT.format((Date) object);
}
return super.formatParameterObject(object);
}
}
Original issue reported on code.google.com by kazuki43zoo
on 4 Oct 2014 at 1:22
What version of the product are you using? On what operating system?
1.16 on RHEL 6.5/Windows 7/OS X
Please provide any additional information below.
I have made a modification to expose Properties.DumpFullDebugStackTrace so it
can be modified dynamically at runtime. We find it extremely useful but are not
free to set the system property and restart at will.
I've attached an IntelliJ patch file for reference. This was done from the
current trunk/1.17-SNAPSHOT source. Simply put, I just removed the "final"
designation on the property and added a static setter in the Properties class.
This is just a suggestion. If you feel there's a better implementation please
use it. I feel others could benefit from this type of enhancement as well.
Thanks.
Original issue reported on code.google.com by [email protected]
on 3 Jun 2014 at 5:31
Attachments:
Hi,
Have you make a look here : https://code.google.com/p/log4jdbc/source/clones ?
Please merge all the patches in your branch, including mine :
- https://code.google.com/p/log4jdbc/issues/detail?id=71
- https://code.google.com/r/makavelikal-log4jdbc
It's such a shame, but it seems that Arthur Blake have definitely left his own
boat since the year 2012.
Thanks a lot.
Original issue reported on code.google.com by [email protected]
on 3 Mar 2015 at 4:39
What steps will reproduce the problem?
1. Enable filtering (eg log4jdbc.dump.sql.insert to false)
2. Perform a batch operation (eg a select)
What is the expected output? What do you see instead?
Expect to see the select logged.
Instead, nothing's logged.
What version of the product are you using? On what operating system?
log4jdbc-log4j2-jdbc4.1-1.16.
Please provide any additional information below.
In Slf4jSpyLogDelegator.sqlOccurred, if the filtering is on, it calls
shouldSqlBeLogged(). This method checks that it starts with
select/insert/update etc. But the batched SQL starts with "batching" and so it
never matches.
Note that this is not a problem if the filtering is off (due, as the
shouldSqlBeLogged() isn't called).
Please see patch attached, with two tests. One with filtering off (SQL is
logged as expected). The other has filtering on, and the SQL is not logged.
Original issue reported on code.google.com by [email protected]
on 28 May 2014 at 5:12
Attachments:
What steps will reproduce the problem?
1. define an XA data source (for H2 for example) using the class
org.h2.jdbcx.JdbcDataSource
2. Wrap the data source defined in step #1 with
net.sf.log4jdbc.sql.jdbcapi.DataSourceSpy
3. Reference the wrapped datasource via a JTA datasource such as
com.atomikos.jdbc.AtomikosDataSourceBean
What is the expected output? What do you see instead?
Expected to see jdbc spy logging output. Instead I get an exception.
Caused by: java.lang.IllegalStateException: Cannot convert value of type
[net.sf.log4jdbc.sql.jdbcapi.DataSourceSpy] to required type
[javax.sql.XADataSource]
What version of the product are you using? On what operating system?
Using version 1.6
Please provide any additional information below.
We either need the DataSourceSpy class to implement javax.sql.XADataSource or
we need a new class "XADataSourceSpy"
Thanks
Original issue reported on code.google.com by [email protected]
on 19 Mar 2014 at 3:33
Currently I can only have one log4jbc configuration even though I have multiple
datasources to spy upon simultaneously in classloader
I'd also like to be able to configure the system myself without using
classloader resources but the current approach would forces me to mutilate
system properties at runtime. It's also quite error prone because I've to time
it to happen prior log4j Properties/SpyLogDelegatorFactory classes are
initialized.
* * *
Would it be possible convert static methods of Properties as non-static and
pass the instance where it's needed just like it's done with SpyLogDelegator.
Other possibility is to make use of ThreadLocal inside
Properties/SpyLogDelegatorFactory methods by setting them up whenever entering
to the "spy network" and tearing themt down when leaving.
StatementSpy for instance gets already the SpyLogDelegator in it's constructor
instead of using SpyLogFactory.getSpyLogDelegator() and this approach could be
used almost everywhere to deliver the Properties instance as well. DriverSpy
seems to be the only place where the registration of the driver is done
statically. DriverManager documentation gives alternative approaches that could
be utilized so that static stuff could be moved to constructor and registration
would be done outside of the class.
Original issue reported on code.google.com by [email protected]
on 11 Feb 2014 at 9:15
What steps will reproduce the problem?
1. Make batch statements.
2. All dump parameters log4jdbc.dump.sql.*=true. That means filtering is
switched off.
3. For example, in log we have:
228283 [main] (19 Nov 2014 18:42:20,185) INFO jdbc.sqlonly - batching 1
statements:
1: update MV_INCOMING_CALL_PROJECT set removed = 1,removalDate = '11/19/2014
18:42:11.260',stateUUID = 'pstcimfs000080000kba2c4u01aiu8b4',state =
'Блокированный' where UUID = 'corebofs000080000kjhtp5ub5gj4n9s'
4. Next I want to exclude update statement using log4jdbc.dump.sql.update=false
5. It doesn't work because prefix "1: " prevent the lib to recognize that it
is an update statement.
What is the expected output? What do you see instead?
Update statement not appeared in log, but other statements do appear.
What version of the product are you using? On what operating system?
1.16
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Nov 2014 at 1:49
I'd like to be able to optionally see the query text without bind variables
replaced so we can ID cases where we are running the same query with different
bind variables
Original issue reported on code.google.com by [email protected]
on 11 Nov 2014 at 3:33
The documentation on the home page says it's called log4jdbc.properties, when
it actually is log4jdbc.log4j2.properties
Original issue reported on code.google.com by [email protected]
on 10 Apr 2013 at 5:11
What steps will reproduce the problem?
1. create Entity Manager
What is the expected output? What do you see instead?
N/A
What version of the product are you using? On what operating system?
H2 1.3.172
1.14 JDBC 4
tomcat dbcp 1.3
EclipseLink 3.4.1
Please provide any additional information below.
In our Apache Tomcat Virgo Server (most probably J2EE also), setup of
persistence fails.
Without proxy db driver work perfect, also the original log4jdbc (ver 1.2)
works good.
Original issue reported on code.google.com by [email protected]
on 20 Jun 2013 at 1:39
Attachments:
(log4jdbc-remix author here: sorry, I wrote this code . Consider this a
placeholder issue. I will try to debug further and add a fix if possible)
On the surface of it, I think it looks like the result set meta data is not
available on the empty result set. Probably behaviour specific to the oracle
driver.
What steps will reproduce the problem?
1. Running a query against Oracle DB, with an empty result set
What is the expected output? What do you see instead?
java.lang.NullPointerException (Integer columnCount=null -> int)
at net.sf.log4jdbc.sql.resultsetcollector.DefaultResultSetCollector.getColumnCount(DefaultResultSetCollector.java:99)
at net.sf.log4jdbc.sql.resultsetcollector.ResultSetCollectorPrinter.getResultSetToPrint(ResultSetCollectorPrinter.java:68)
at net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator.resultSetCollected(Slf4jSpyLogDelegator.java:608)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.reportAllReturns(ResultSetSpy.java:104)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.reportReturn(ResultSetSpy.java:192)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.next(ResultSetSpy.java:1983)
...
What version of the product are you using? On what operating system?
groupId=org.bgee.log4jdbc-log4j2
artifactId=log4jdbc-log4j2-jdbc4
version=1.15
Centos 6.4
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
ojdbc*.jar Not sure which (underlying) driver I am using!
Original issue reported on code.google.com by [email protected]
on 30 Oct 2013 at 11:59
Discovered two issues when trying to get this artifact using Maven:
1. the <dependency> example on the main project page has the wrong groupId: it
should be org.bgee, not org.bgee.log4jdbc-log4j2
2. the main project page says the artifact is in the Sonatype repo
(https://repository.sonatype.org, I assume?), but I couldn't locate it there
anywhere
Original issue reported on code.google.com by [email protected]
on 10 Apr 2013 at 3:12
When the printing of the ResultSets is enabled, if a call to next() on a
ResultSet returns false, and if close is then called, the ResultSet is printed
twice.
This is because this implementation takes care of printing the ResultSet when
close is called (log4jdbc-remix triggers the printing only on a call to next).
Original issue reported on code.google.com by [email protected]
on 20 Jun 2013 at 10:36
What steps will reproduce the problem?
1. ojdbc14-10.2.0.2.0.jar
2. <dependency>
<groupId>org.bgee.log4jdbc-log4j2</groupId>
<artifactId>log4jdbc-log4j2-jdbc4</artifactId>
<version>1.16</version>
</dependency>
3. JavaSE-1.6
4.
What is the expected output? What do you see instead?
org.springframework.web.util.NestedServletException: Handler processing failed;
nested exception is java.lang.AbstractMethodError:
oracle.jdbc.driver.OracleResultSetImpl.isClosed()Z
at org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1259)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at org.springframework.test.web.servlet.TestDispatcherServlet.service(TestDispatcherServlet.java:66)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.springframework.mock.web.MockFilterChain$ServletFilterProxy.doFilter(MockFilterChain.java:168)
at org.springframework.mock.web.MockFilterChain.doFilter(MockFilterChain.java:136)
at org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:134)
at com.yunda.dp.dpsoa.controller.MvcTest.testGetDocDtl(MvcTest.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.AbstractMethodError:
oracle.jdbc.driver.OracleResultSetImpl.isClosed()Z
at net.sf.log4jdbc.sql.resultsetcollector.DefaultResultSetCollector.loadMetaDataIfNeeded(DefaultResultSetCollector.java:122)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.loadMetaDataIfNeeded(ResultSetSpy.java:82)
at net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy.close(ResultSetSpy.java:1534)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.ibatis.logging.jdbc.ResultSetLogger.invoke(ResultSetLogger.java:59)
at $Proxy30.close(Unknown Source)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.closeResultSet(FastResultSetHandler.java:165)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:194)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:154)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:57)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:354)
at $Proxy16.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at $Proxy17.getDocType(Unknown Source)
at com.yunda.dp.dpsoa.service.impl.BaseDocService.getDocumentType(BaseDocService.java:36)
at com.yunda.dp.dpsoa.web.DocController.getDocDtl(DocController.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
... 40 more
Please provide any additional information below.
see the attachment for detail!
fine in version
<dependency>
<groupId>org.bgee.log4jdbc-log4j2</groupId>
<artifactId>log4jdbc-log4j2-jdbc3</artifactId>
<version>1.16</version>
</dependency>
Original issue reported on code.google.com by [email protected]
on 14 Mar 2014 at 7:30
Attachments:
Unable to find Log4j2 as default logging library. Please provide a logging
library and configure a valid spyLogDelegator
java.util.ServiceConfigurationError: java.sql.Driver: Provider
net.sf.log4jdbc.sql.jdbcapi.DriverSpy could not be instantiated
Original issue reported on code.google.com by [email protected]
on 9 Nov 2014 at 6:39
When the printing of the ResultSets is enabled, as well as the filling of
unread values: if close() is called on the ResultSet, but the previous call to
next() did not return false (not the end of the result set), the ResultSet is
printed, but the unread values of the last line are not filled.
This is because this implementation takes care of printing a ResultSet on a
call to close(), even if it was not the end of the result set (previous call to
next() returned true). log4jdbc-remix only triggers the printing on a call to
next()
Original issue reported on code.google.com by [email protected]
on 20 Jun 2013 at 10:40
What steps will reproduce the problem?
1. Set log4jdbc.statement.warn to false in properties
2. Call StatementSpy.addBatch()
What is the expected output? What do you see instead?
Do not expect to see "{WARNING: Statement used to run SQL}"
But do see "{WARNING: Statement used to run SQL}"
What version of the product are you using? On what operating system?
log4jdbc-log4j2-jdbc4.1-1.16
Please provide any additional information below.
reportStatementSql() has this:
_reportSql((Properties.isStatementUsageWarn()?StatementSqlWarning:"") +
sql, methodCall);
But addBatch() just has:
currentBatch.add(StatementSqlWarning + sql);
Original issue reported on code.google.com by [email protected]
on 28 May 2014 at 4:58
If the app uses slf4j and doesn't have a log4jdbc.log4j2.properties file with
the spylogdelegator.name set to the slf4j one, the only error in the logs is a
NoClassDefFoundError about not being able to initialize
net.sf.log4jdbc.sql.jdbcapi.DriverSpy. The reason for that is because the
driver class has a static member variable that calls
SpyLogFactory.getSpyLogDelegator(), and if that method throws an exception
(which it would in the above case) the only thing that gets logged is the
NoClassDefFoundError.
Original issue reported on code.google.com by [email protected]
on 10 Apr 2013 at 5:16
The documentation says that you just need to add a ^ to the beginning of the
former package prefix to make log4jdbc.debug.stack.prefix work as a regex, but
I found that I had to add .* to the end, i.e.
log4jdbc.debug.stack.prefix=^org.mypackage
doesn't work but
log4jdbc.debug.stack.prefix=^org\.mypackage.*
does. It's somewhat obvious since the docs say that it's a regex, but the
current language is a little misleading for users who aren't used to using them.
Original issue reported on code.google.com by [email protected]
on 28 Jan 2014 at 9:46
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.