这是什么问题?谁告知下

com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.NullPointerException

at com.jfinal.plugin.activerecord.Model.find(Model.java:565)

at models.sys.Notice.findNoticeAndSmsByDate(Notice.java:42)

at services.SendNoticeService.send(SendNoticeService.java:38)

at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:14)

at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:1)

at net.dreamlu.event.EventKit$1.run(EventKit.java:60)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.NullPointerException

at com.jfinal.plugin.activerecord.Model.checkTableName(Model.java:576)

at com.jfinal.plugin.activerecord.Model.find(Model.java:542)

at com.jfinal.plugin.activerecord.Model.find(Model.java:563)

... 8 more


评论区

九块腹肌进先生

2017-08-05 11:34

com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.find(Model.java:565)
at models.sys.Notice.findNoticeAndSmsByDate(Notice.java:42)
at services.SendNoticeService.send(SendNoticeService.java:38)
at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:14)
at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:1)
at net.dreamlu.event.EventKit$1.run(EventKit.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.checkTableName(Model.java:576)
at com.jfinal.plugin.activerecord.Model.find(Model.java:542)
at com.jfinal.plugin.activerecord.Model.find(Model.java:563)
... 8 more
Exception in thread "pool-1-thread-3" com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.find(Model.java:565)
at models.sys.Notice.findNoticeAndSmsByDate(Notice.java:42)
at services.SendNoticeService.send(SendNoticeService.java:38)
at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:14)
at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:1)
at net.dreamlu.event.EventKit$1.run(EventKit.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.checkTableName(Model.java:576)
at com.jfinal.plugin.activerecord.Model.find(Model.java:542)
at com.jfinal.plugin.activerecord.Model.find(Model.java:563)
... 8 more
Exception in thread "pool-1-thread-5"
com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.find(Model.java:565)
at models.sys.Notice.findNoticeAndSmsByDate(Notice.java:42)
at services.SendNoticeService.send(SendNoticeService.java:38)
at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:14)
at jobs.sendnotice.SendNoticeListener.onApplicationEvent(SendNoticeListener.java:1)
at net.dreamlu.event.EventKit$1.run(EventKit.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.checkTableName(Model.java:576)
at com.jfinal.plugin.activerecord.Model.find(Model.java:542)
at com.jfinal.plugin.activerecord.Model.find(Model.java:563)
... 8 more
2017-08-05 11:30:00.034 [DefaultQuartzScheduler_Worker-5] INFO services.LoginStatusService - 执行了时间:2017-08-05T11:30:00.034+08:00
2017-08-05 11:30:00.101 [DefaultQuartzScheduler_Worker-5] ERROR org.quartz.core.JobRunShell - Job jobs.LoginStatusJob.jobs.LoginStatusJob threw an unhandled Exception:
com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.find(Model.java:565)
at models.member.MemberLogin.findLogin(MemberLogin.java:166)
at services.LoginStatusService.updateStatus(LoginStatusService.java:36)
at jobs.LoginStatusJob.execute(LoginStatusJob.java:14)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.lang.NullPointerException: null
at com.jfinal.plugin.activerecord.Model.checkTableName(Model.java:576)
at com.jfinal.plugin.activerecord.Model.find(Model.java:542)
at com.jfinal.plugin.activerecord.Model.find(Model.java:563)
... 5 common frames omitted
2017-08-05 11:30:00.101 [DefaultQuartzScheduler_Worker-5] ERROR org.quartz.core.ErrorLogger - Job (jobs.LoginStatusJob.jobs.LoginStatusJob threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Model.find(Model.java:565)
at models.member.MemberLogin.findLogin(MemberLogin.java:166)
at services.LoginStatusService.updateStatus(LoginStatusService.java:36)
at jobs.LoginStatusJob.execute(LoginStatusJob.java:14)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.jfinal.plugin.activerecord.Model.checkTableName(Model.java:576)
at com.jfinal.plugin.activerecord.Model.find(Model.java:542)
at com.jfinal.plugin.activerecord.Model.find(Model.java:563)
... 5 common frames omitted
Exception in thread "pool-1-thread-2"

九块腹肌进先生

2017-08-05 11:35

现在貌似访问数据库就会出错 这个是项目启动定期器的定时任务 一分钟一次 然后就报错

lyh061619

2017-08-05 20:49

检查下ActiveRecord插件启动了没

JFinal

2017-08-06 10:25

Caused by: java.lang.NullPointerException 这类异常不用多说了吧,单步调试秒秒钟解决

九块腹肌进先生

2017-08-07 18:13

@JFinal 我知道是什么原因了 SELECT ddo.* FROM dele_order ddo where ddo.status > ? 这个>(大于号)的问题 换成 >就可以了 转义一下

九块腹肌进先生

2017-08-07 18:14

@JFinal me.add(new SqlInXmlPlugin());

JFinal

2017-08-07 19:37

@九块腹肌进先生 建议使用 jfinal ActiveRecordPlugin 自带的 sql 管理功能,在 jfinal 手册中有详细的使用说明

九块腹肌进先生

2017-08-07 19:58

@JFinal 嗯 知道 谢谢波总耐心解答疑惑

热门反馈

扫码入社