Ich habe Probleme mit der Konfiguration eines Timers in Java. Um genau zu sein - ich erhalte den folgenden Fehler beim Versuch, meine peripherial.war
zu implementieren.Wildfly TimerService unzufriedene Abhängigkeiten
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"peripherial.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"peripherial.war\".WeldStartService: Failed to start service
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type TimerService with qualifiers @Default
at injection point [BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedConstructor] @Inject public io.github.tastypenguinbacon.peripherial.heartbeat.service.PassiveHeartbeatService(Cache, TimerService)
at io.github.tastypenguinbacon.peripherial.heartbeat.service.PassiveHeartbeatService.<init>(PassiveHeartbeatService.java:0)
"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"peripherial.war\".WeldStartService"]}
Die standalone.xml
Datei scheint in Ordnung zu sein. Der Teil (zumindest ich erwarte es sein) für die Konfiguration des Timer-Service verantwortlich scheint auch in Ordnung:
<timer-service thread-pool-name="default" default-data-store="default-file-store">
<data-stores>
<file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
</data-stores>
</timer-service>
Ich Instanziieren des TimerService- durch die @Inject
, Konstruktor basierte Injektion zu verwenden, wenn es irgendwie relevant ist. Ich verwende wildfly-11.0.0.Alpha
. In der Standard-Datei standalone.xml
wurde nur die IP-Adresse geändert, die auf den Server zugreifen kann.