Issue
I am trying to implement a project using jobrunr. I have a use case where a service I have written should be triggered once the maximum retries are done for a job. I tried achieving the same using href="https://stackoverflow.com/questions/72950953/jobrunr-spring-boot-how-to-get-notified-if-a-recurring-job-including-retries">this answer as reference. The filter logic is triggered once a job fails but the dependency I include (which has my logic) is returning a null point exception(java.lang.NullPointerException: Cannot invoke "com.project.service.ScheduleHistoryService.someFunc()" because "this.service" is null). I am able to inject the same service file using @Autowire in my other components. What am I doing wrong here? I am using jobrunr version 5.1.4. Attached is a screenshot of the sample code:enter image description here
Solution
Injecting services in the filters is only possible in the Pro version of JobRunr.
Answered By - rdehuyss
Answer Checked By - Katrina (JavaFixing Volunteer)