u011148015
贫僧也懂澎湃
采纳率0%
2016-06-30 10:24 阅读 7.6k

spring task定时任务调用一个短信的发送接口总是报空指针异常

2016-06-30 17:48:30,321 ERROR [org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler] - Unexpected error occurred in scheduled task.
java.lang.NullPointerException
at com.pactera.jeesite.modules.soa.service.impl.MessageApplicationImpl.sendMsgByTelphones(MessageApplicationImpl.java:50)
at com.pactera.jeesite.modules.jobTask.MyJob.sendMsgByMidFlights(MyJob.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
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)
![![图片说明](https://img-ask.csdn.net/upload/201606/30/1467282244_481450.png)图片说明](https://img-ask.csdn.net/upload/201606/30/1467282236_43015.png)图片说明

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • qq_32957421 qq_32957421 2017-11-13 07:55

    跟你一样的问题 在本地没事 放服务器就这样了

    点赞 2 评论 复制链接分享
  • u011148015 贫僧也懂澎湃 2016-06-30 10:24

    图片说明

    点赞 评论 复制链接分享
  • u011148015 贫僧也懂澎湃 2016-06-30 10:25

    图片说明

    点赞 评论 复制链接分享