Replies: 1 comment
-
/cc @mkouba |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi;
I'm trying to Inject the built-in Scheduler to pause/resume a scheduled job. I followed the documentation https://quarkus.io/guides/scheduler-reference.
import io.quarkus.logging.Log;
import io.quarkus.scheduler.Scheduled;
import io.quarkus.scheduler.Scheduler;
import javax.inject.Inject;
import java.sql.SQLException;
import static io.quarkus.scheduler.Scheduled.ConcurrentExecution.SKIP;
public class ForwarderBean extends TimerBean {
@Inject
Scheduler scheduler;
}
when the applications starts up i get the following error:
2022-07-15 10:26:05,567 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.StackOverflowError
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.smallrye.config.SysPropConfigSource.getValue(SysPropConfigSource.java:53)
at io.smallrye.config.ConfigValueConfigSourceWrapper.getConfigValue(ConfigValueConfigSourceWrapper.java:20)
at io.smallrye.config.SmallRyeConfigSources.getValue(SmallRyeConfigSources.java:29)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.SecretKeysConfigSourceInterceptor.getValue(SecretKeysConfigSourceInterceptor.java:22)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.RelocateConfigSourceInterceptor.getValue(RelocateConfigSourceInterceptor.java:25)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.ProfileConfigSourceInterceptor.getProfileValue(ProfileConfigSourceInterceptor.java:62)
at io.smallrye.config.ProfileConfigSourceInterceptor.getValue(ProfileConfigSourceInterceptor.java:43)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:46)
at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:38)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:17)
at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:307)
at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:225)
at io.smallrye.config.SmallRyeConfig.getOptionalValue(SmallRyeConfig.java:324)
at io.quarkus.scheduler.common.runtime.util.SchedulerUtils$1.accept(SchedulerUtils.java:122)
at io.quarkus.scheduler.common.runtime.util.SchedulerUtils$1.accept(SchedulerUtils.java:119)
at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
at io.quarkus.scheduler.common.runtime.util.SchedulerUtils.resolvePropertyExpression(SchedulerUtils.java:119)
at io.quarkus.scheduler.common.runtime.util.SchedulerUtils.lookUpPropertyValue(SchedulerUtils.java:87)
at io.quarkus.scheduler.runtime.SimpleScheduler.createTrigger(SimpleScheduler.java:234)
at io.quarkus.scheduler.runtime.SimpleScheduler_Subclass.createTrigger$$superforward1(Unknown Source)
at io.quarkus.scheduler.runtime.SimpleScheduler_Subclass.createTrigger(Unknown Source)
at io.quarkus.scheduler.runtime.SimpleScheduler.(SimpleScheduler.java:106)
at io.quarkus.scheduler.runtime.SimpleScheduler_Subclass.(Unknown Source)
at io.quarkus.scheduler.runtime.SimpleScheduler_Bean.create(Unknown Source)
at io.quarkus.scheduler.runtime.SimpleScheduler_Bean.create(Unknown Source)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:111)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:35)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:32)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:32)
at io.quarkus.scheduler.runtime.SimpleScheduler_Bean.get(Unknown Source)
at io.quarkus.scheduler.runtime.SimpleScheduler_Bean.get(Unknown Source)
at com.ifs.notification.ForwarderBean_Bean.create(Unknown Source)
at com.ifs.notification.ForwarderBean_Bean.create(Unknown Source)
It seems to be complaining about privileges/configsource. I have included following dependencies. Am I missing something?
<quarkus.platform.version>2.10.1.Final</quarkus.platform.version>
...
....
io.quarkus
quarkus-websockets
io.quarkus
quarkus-agroal
io.quarkus
quarkus-jdbc-oracle
io.quarkus
quarkus-smallrye-health
io.quarkus
quarkus-arc
io.quarkus
quarkus-scheduler
io.quarkus
quarkus-junit5
test
Thanx in advance
Beta Was this translation helpful? Give feedback.
All reactions