无法使用akka quartz计划程序第二次计划作业
我无法第二次启动Akka Quartz调度程序。无法使用akka quartz计划程序第二次计划作业,akka,scheduler,quartz,Akka,Scheduler,Quartz,我无法第二次启动Akka Quartz调度程序。 我得到一个错误,说: “注入构造函数时出错,org.quartz.SchedulerException:名为'QuartzScheduler~-application'的计划程序已存在” 公共类JobModule扩展AbstractModule实现ServiceGuiceSupport{ @凌驾 受保护的void configure(){ //阿克卡石英调度器 bind(QuartzSchedulerExtension.class).toProv
我得到一个错误,说: “注入构造函数时出错,org.quartz.SchedulerException:名为'QuartzScheduler~-application'的计划程序已存在”
公共类JobModule扩展AbstractModule实现ServiceGuiceSupport{
@凌驾
受保护的void configure(){
//阿克卡石英调度器
bind(QuartzSchedulerExtension.class).toProvider(SchedulerJobInitializer.class);
}
私有静态类SchedulerJobiInitializer实现提供程序{
私人QuartzScheduleXtension QuartzScheduleXtension;
@注入
公共调度程序动态初始化器(ActorSystem ActorSystem){
this.quartzSchedulerExtension=新的quartzSchedulerExtension((ExtendedActorSystem)actorSystem);
}
@凌驾
公共QuartzScheduleXtension get(){
返回QuartzScheduleXtension;
}
}
}
//在课下注射,结果失败了
公共类作业调度器{
私有最终参与者系统;
私人最终QuartzScheduleXtension QuartzScheduleXtension;
@注入
公共作业调度程序(QuartzScheduleXtension QuartzScheduleXtension,
ActorSystem(操作系统){
this.quartzSchedulerExtension=quartzSchedulerExtension;
这个系统=系统;
}
}
堆栈跟踪:
Error injecting constructor, org.quartz.SchedulerException: Scheduler with name 'QuartzScheduler~feed-integration-impl-application' already exists.
at com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer.<init>(FeedIntegrationModule.java:83)
while locating com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer
while locating com.typesafe.akka.extension.quartz.QuartzSchedulerExtension
for the 3rd parameter of com.aie.arc.feed.impl.scheduler.FeedScheduler.<init>(FeedScheduler.java:40)
while locating com.aie.arc.feed.impl.scheduler.FeedScheduler
for the 5th parameter of com.aie.arc.feed.impl.service.FeedIntegrationServiceImpl.<init>(FeedIntegrationServiceImpl.java:69)
at com.lightbend.lagom.javadsl.server.ServiceGuiceSupport$LagomServiceBuilder.bind(ServiceGuiceSupport.java:135) (via modules: com.google.inject.util.Modules$OverrideModule -> com.aie.arc.feed.impl.module.FeedIntegrationModule)
while locating com.aie.arc.feed.impl.service.FeedIntegrationServiceImpl
at com.lightbend.lagom.javadsl.server.ServiceGuiceSupport$LagomServiceBuilder.bind(ServiceGuiceSupport.java:153) (via modules: com.google.inject.util.Modules$OverrideModule -> com.aie.arc.feed.impl.module.FeedIntegrationModule)
while locating com.lightbend.lagom.internal.javadsl.server.ResolvedServices
for the 2nd parameter of com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry.<init>(ServiceRegistrationModule.scala:47)
at com.lightbend.lagom.internal.server.ServiceRegistrationModule.bindings(ServiceRegistrationModule.scala:27):
Binding(class com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry to self eagerly) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$4)
while locating com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry
Caused by: org.quartz.SchedulerException: Scheduler with name 'QuartzScheduler~feed-integration-impl-application' already exists.
at org.quartz.impl.SchedulerRepository.bind(SchedulerRepository.java:80)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:529)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:415)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:372)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:330)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:298)
at com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.scheduler$lzycompute(QuartzSchedulerExtension.scala:436)
at com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.scheduler(QuartzSchedulerExtension.scala:433)
at com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.<init>(QuartzSchedulerExtension.scala:60)
at com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer.<init>(FeedIntegrationModule.java:84)
at com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer$$FastClassByGuice$$c1b5d634.newInstance(<generated>)
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:60)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1050)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:443)
at play.api.inject.ContextClassLoaderInjector.$anonfun$instanceOf$3(Injector.scala:120)
at play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:128)
22:19:56.727 [ at play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:120)
info at com.lightbend.lagom.internal.javadsl.server.ResolvedServicesProvider.$anonfun$get$1(JavadslServerBuilder.scala:120)
错误注入构造函数,org.quartz.SchedulerException:名为“QuartzScheduler~feed integration impl application”的调度器已存在。
在com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobiInitializer上(FeedIntegrationModule.java:83)
查找com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobiInitializer时
查找com.typesafe.akka.extension.quartz.quartzScheduleXtension时
用于com.aie.arc.feed.impl.scheduler.FeedScheduler的第三个参数。(FeedScheduler.java:40)
查找com.aie.arc.feed.impl.scheduler.FeedScheduler时
用于com.aie.arc.feed.impl.service.FeedIntegrationServiceImpl的第五个参数。(FeedIntegrationServiceImpl.java:69)
在com.lightbend.lagom.javadsl.server.ServiceGuiceSupport$LagomServiceBuilder.bind(ServiceGuiceSupport.java:135)(通过模块:com.google.inject.util.modules$OverrideModule->com.aie.arc.feed.impl.module.FeedIntegrationModule)
查找com.aie.arc.feed.impl.service.FeedIntegrationServiceImpl时
在com.lightbend.lagom.javadsl.server.ServiceGuiceSupport$LagomServiceBuilder.bind(ServiceGuiceSupport.java:153)(通过模块:com.google.inject.util.modules$OverrideModule->com.aie.arc.feed.impl.module.FeedIntegrationModule)
查找com.lightbend.lagom.internal.javadsl.server.ResolvedServices时
用于com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry的第二个参数。(ServiceRegistrationModule.scala:47)
位于com.lightbend.lagom.internal.server.ServiceRegistrationModule.bindings(ServiceRegistrationModule.scala:27):
绑定(类com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry to self)(通过模块:com.google.inject.util.modules$OverrideModule->play.api.inject.guice.GuiceableModuleConversions$$anon$4)
查找com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry时
原因:org.quartz.SchedulerException:名为“QuartzScheduler~feed integration impl application”的计划程序已存在。
位于org.quartz.impl.SchedulerRepository.bind(SchedulerRepository.java:80)
位于org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:529)
位于org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:415)
位于org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:372)
位于org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:330)
位于org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:298)
位于com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.scheduler$lzycompute(QuartzSchedulerExtension.scala:436)
位于com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.scheduler(QuartzSchedulerExtension.scala:433)
在com.typesafe.akka.extension.quartz.QuartzSchedulerExtension。(QuartzSchedulerExtension.scala:60)
在com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobiInitializer上(FeedIntegrationModule.java:84)
在com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobiInitializer$$FastClassByGuice$$c1b5d634.newInstance()上
在com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
位于com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
位于com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
在com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)上
位于com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:60)
位于com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
位于com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
位于com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
位于com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
在com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)上
在com.google.inject.internal.SingleParameterInjector.inject(Sing
Error injecting constructor, org.quartz.SchedulerException: Scheduler with name 'QuartzScheduler~feed-integration-impl-application' already exists.
at com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer.<init>(FeedIntegrationModule.java:83)
while locating com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer
while locating com.typesafe.akka.extension.quartz.QuartzSchedulerExtension
for the 3rd parameter of com.aie.arc.feed.impl.scheduler.FeedScheduler.<init>(FeedScheduler.java:40)
while locating com.aie.arc.feed.impl.scheduler.FeedScheduler
for the 5th parameter of com.aie.arc.feed.impl.service.FeedIntegrationServiceImpl.<init>(FeedIntegrationServiceImpl.java:69)
at com.lightbend.lagom.javadsl.server.ServiceGuiceSupport$LagomServiceBuilder.bind(ServiceGuiceSupport.java:135) (via modules: com.google.inject.util.Modules$OverrideModule -> com.aie.arc.feed.impl.module.FeedIntegrationModule)
while locating com.aie.arc.feed.impl.service.FeedIntegrationServiceImpl
at com.lightbend.lagom.javadsl.server.ServiceGuiceSupport$LagomServiceBuilder.bind(ServiceGuiceSupport.java:153) (via modules: com.google.inject.util.Modules$OverrideModule -> com.aie.arc.feed.impl.module.FeedIntegrationModule)
while locating com.lightbend.lagom.internal.javadsl.server.ResolvedServices
for the 2nd parameter of com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry.<init>(ServiceRegistrationModule.scala:47)
at com.lightbend.lagom.internal.server.ServiceRegistrationModule.bindings(ServiceRegistrationModule.scala:27):
Binding(class com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry to self eagerly) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$4)
while locating com.lightbend.lagom.internal.server.ServiceRegistrationModule$RegisterWithServiceRegistry
Caused by: org.quartz.SchedulerException: Scheduler with name 'QuartzScheduler~feed-integration-impl-application' already exists.
at org.quartz.impl.SchedulerRepository.bind(SchedulerRepository.java:80)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:529)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:415)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:372)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:330)
at org.quartz.impl.DirectSchedulerFactory.createScheduler(DirectSchedulerFactory.java:298)
at com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.scheduler$lzycompute(QuartzSchedulerExtension.scala:436)
at com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.scheduler(QuartzSchedulerExtension.scala:433)
at com.typesafe.akka.extension.quartz.QuartzSchedulerExtension.<init>(QuartzSchedulerExtension.scala:60)
at com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer.<init>(FeedIntegrationModule.java:84)
at com.aie.arc.feed.impl.module.FeedIntegrationModule$SchedulerJobInitializer$$FastClassByGuice$$c1b5d634.newInstance(<generated>)
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:60)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1050)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:443)
at play.api.inject.ContextClassLoaderInjector.$anonfun$instanceOf$3(Injector.scala:120)
at play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:128)
22:19:56.727 [ at play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:120)
info at com.lightbend.lagom.internal.javadsl.server.ResolvedServicesProvider.$anonfun$get$1(JavadslServerBuilder.scala:120)