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