You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using org.springframework.scheduling.support.PeriodicTrigger trigger with custom SchedulingConfigurer NPE is thrown because PeriodicTrigger is without initial duration
11:00:08.565 ERROR [http-nio-9898-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.NullPointerException: Cannot invoke "java.time.Duration.toMillis()" because the return value of "org.springframework.scheduling.support.PeriodicTrigger.getInitialDelayDuration()" is null] with root cause
java.lang.NullPointerException: Cannot invoke "java.time.Duration.toMillis()" because the return value of "org.springframework.scheduling.support.PeriodicTrigger.getInitialDelayDuration()" is null
at org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint$IntervalTaskDescriptor.<init>(ScheduledTasksEndpoint.java:189)
at org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint$FixedDelayTaskDescriptor.<init>(ScheduledTasksEndpoint.java:214)
at org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint$TaskDescriptor.describeTriggerTask(ScheduledTasksEndpoint.java:152)
at org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint$TaskDescriptor.lambda$static$3(ScheduledTasksEndpoint.java:127)
...
Since PeriodicTrigger.getInitialDelayDuration() is @Nullable, probably IntervalTaskDescriptor should have some sort of null check for that.
Spring Boot 3.1.1, Spring Framework 6.0.10
The text was updated successfully, but these errors were encountered:
When using
org.springframework.scheduling.support.PeriodicTrigger
trigger with customSchedulingConfigurer
NPE is thrown becausePeriodicTrigger
is without initial durationSince
PeriodicTrigger.getInitialDelayDuration()
is@Nullable
, probablyIntervalTaskDescriptor
should have some sort of null check for that.Spring Boot 3.1.1, Spring Framework 6.0.10
The text was updated successfully, but these errors were encountered: