[ERROR] 16:00:20.293 org.quartz.core.JobRunShell.run(JobRunShell.java:211) - Job DEFAULT.com.panport.raiis.fids.util.MonitorDeviceScheduler threw an unhandled Exception:
org.nutz.dao.DaoException: org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:139)
at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:245)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:257)
at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55)
at org.nutz.dao.impl.NutDao.update(NutDao.java:224)
at com.panport.raiis.fids.service.impl.DeviceIrregularServiceImpl.checkDevices(DeviceIrregularServiceImpl.java:70)
at com.panport.raiis.fids.util.MonitorDeviceScheduler.execute(MonitorDeviceScheduler.java:44)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123)
at org.apache.shiro.subject.Subject$Builder.<init>(Subject.java:627)
at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56)
at com.panport.raiis.nutz.util.UpdateDaoInterceptor.filter(UpdateDaoInterceptor.java:56)
at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125)
... 10 more
[ERROR] 16:00:20.297 org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2425) - Job (DEFAULT.com.panport.raiis.fids.util.MonitorDeviceScheduler threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.nutz.dao.DaoException: org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.nutz.dao.DaoException: org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:139)
at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:92)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:81)
at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:245)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:257)
at org.nutz.dao.impl.EntityOperator.exec(EntityOperator.java:55)
at org.nutz.dao.impl.NutDao.update(NutDao.java:224)
at com.panport.raiis.fids.service.impl.DeviceIrregularServiceImpl.checkDevices(DeviceIrregularServiceImpl.java:70)
at com.panport.raiis.fids.util.MonitorDeviceScheduler.execute(MonitorDeviceScheduler.java:44)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 more
Caused by: org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123)
at org.apache.shiro.subject.Subject$Builder.<init>(Subject.java:627)
at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56)
at com.panport.raiis.nutz.util.UpdateDaoInterceptor.filter(UpdateDaoInterceptor.java:56)
at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:125)
... 10 more
[DEBUG] 16:00:47.213 org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:276) - batch acquisition of 0 triggers
出错的代码是
dao().update(device);
定时任务代码
@IocBean
public class MonitorDeviceScheduler implements Job {
@Inject protected DeviceIrregularService deviceIrregularService;
Logger log = new Logger(this.getClass());
public static Map<String, Date> dateMap = new HashMap<>();
@Inject protected Dao dao;
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
log.error("=================定时任务开始:"+System.currentTimeMillis()+"====================");
deviceIrregularService.checkDevices();
log.error("=================定时任务结束:"+System.currentTimeMillis()+"====================");
}