question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPE in ApplyMisfire

See original GitHub issue

Hi I am Getting This issue.

Caused by: java.lang.NullPointerException
	at net.joelinn.quartz.jobstore.AbstractRedisStorage.applyMisfire(AbstractRedisStorage.java:565)
	at net.joelinn.quartz.jobstore.AbstractRedisStorage.acquireNextTriggers(AbstractRedisStorage.java:819)
	at net.joelinn.quartz.jobstore.RedisJobStore$39.doWithLock(RedisJobStore.java:1041)
	at net.joelinn.quartz.jobstore.RedisJobStore$39.doWithLock(RedisJobStore.java:1037)
	at net.joelinn.quartz.jobstore.RedisJobStore.doWithLock(RedisJobStore.java:1154)
	... 2 more

Code that I am Executing

public class TestQuartzWithRedis {
    public static void main (String[] args) throws SchedulerException, InterruptedException {
        Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
        scheduler.start();

        Date startTime = DateBuilder.futureDate(5000, DateBuilder.IntervalUnit.MILLISECOND);

        JobDetail job = JobBuilder
                .newJob(SampleJob.class)
                .withIdentity(UUID.randomUUID().toString(), "messageGroup")
                .requestRecovery()
                .build();

        SimpleTrigger trigger = (SimpleTrigger) newTrigger()
                .forJob(job)
                .withIdentity("trigger:" + UUID.randomUUID().toString(), "messageGroup")
                .startAt(startTime)
                .build();
        scheduler.scheduleJob(job, trigger);

    }
}

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
agnibha92commented, Sep 8, 2018

This specifically happens if you have symbols in your trigger and job name…

0reactions
agnibha92commented, Mar 4, 2019
 public static String getUniqueIdentifier(String schedName,
            String schedInstId) {
        return schedName + "_$_" + schedInstId;
}

This is the method in quartz that generates unique identifier

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPE while resuming job | Confluence Server and Data Center
NPE while resuming job. Closed: Assignee: Priority: Resolution: Closed. Chris Kiehl ... applyMisfire(RAMJobStore.java:1090) at org.quartz.simpl.RAMJobStore.
Read more >
org.terracotta.quartz.DefaultClusteredJobStore.getLog java code ...
currentTimeMillis(); // this MUST happen before initializing the trigger set (otherwise we might receive an update which get an NPE) // this.serializer.
Read more >
Quartz 1.6.1 Release Notes
getFireAtTime() method result does not match the result that is documented in Javadoc. Bug · QUARTZ-581 · NullPointerException in RAMJobStore.applyMisfire.
Read more >
困扰多年的Quartz重复调度的问题,终于找到原因 - 博客园
执行applyMisfire的时候,如果满足 getNextFireTime + threshold < now 则导致misFire触发,此时再根据 Misfire Instruction 判定是否重复触发,假如
Read more >
Quartz 1.6.1.html - searchcode
... .com/browse/QUARTZ-558">NullPointerException cloning CronTrigger without cron ... applyMisfire</a> 578 </td> 579 </tr> 580 <tr class="rowAlternate"> 581 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found