org.quartz.SchedulerException: Job threw an unhandled exception

 1)问题

111018 00:01:05 [QuartzScheduler.java:2149] ERROR: Job (DEFAULT.cell_d_job threw an exception.

org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]

        at org.quartz.core.JobRunShell.run(JobRunShell.java:206)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

Caused by: java.lang.NullPointerException

111018 00:01:05 [LoggingJobHistoryPlugin.java:498] WARN: Job DEFAULT.cell_d_job execution failed at  00:01:05 10/18/2011 and reports: org.quartz.SchedulerExc

eption: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]

org.quartz.JobExecutionException: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException] [Se

e nested exception: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]]

        at org.quartz.core.JobRunShell.run(JobRunShell.java:212)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

Caused by: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]

        at org.quartz.core.JobRunShell.run(JobRunShell.java:206)

        ... 1 more

Caused by: java.lang.NullPointerException

 

 

2)原因:quartz 捕获了异常,不能看到具体的程序错误

  public void start()

        throws SchedulerException

    {

        if(closed)

            throw new SchedulerException("The Scheduler cannot be restarted after shutdown() has been called.");

        if(initialStart == null)

        {

            initialStart = new Date();

            resources.getJobStore().schedulerStarted();

            startPlugins();

        }

        schedThread.togglePause(false);

        getLog().info("Scheduler " + resources.getUniqueIdentifier() + " started.");

}

 

public static void startScheduler()

  {

    SchedulerFactory sf;

    try {

      sf = new StdSchedulerFactory();

      Scheduler sched = sf.getScheduler();

      sched.start();

    }

    catch (SchedulerException e)

    {

      e.printStackTrace();

    }

  }

 

 

3)解决方式:得绕开quartz ,单独调试程序,抛出上层错误

单独执行sh -x kpi.sh cell.d.xml

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值