bloodmarry12 / log4jdbc-log4j2

Automatically exported from code.google.com/p/log4jdbc-log4j2
0 stars 1 forks source link

Spring @Scheduled method #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
See issue #9. Please tell me if the snapshot 1.16-SNAPSHOT fixes your problem.

Original comment by frederic...@gmail.com on 11 Dec 2013 at 12:25

GoogleCodeExporter commented 9 years ago
Release version 1.16 should fix your problem, please let me know if it is not 
the case.

Original comment by frederic...@gmail.com on 12 Dec 2013 at 12:22

GoogleCodeExporter commented 9 years ago

Original comment by frederic...@gmail.com on 12 Feb 2014 at 12:27