This is an intermittent error that has been puzzeling me for some weeks now. Sometimes, when I start our RCP Client this fails with the following error logs
12.07.2021 15:46:37.513 [2bcb0ca164] [DEBUG] c.e.k.s.extension.KlvApiObjectMapper - Initialize new ObjectMapper. 12.07.2021 15:46:42.798 [ main] [INFO ] c.evolit.klv.ui.state.ApplicationState - ClientId set to 000C292A7378 org.eclipse.e4.core.di.InjectionException: Unable to process "LoginController.authService": no actual value was found for the argument "AuthenticationServiceInterface[@org.eclipse.e4.core.di.extensions.Service(filterExpression=, dynamic=true)]". at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:482) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:473) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:129) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveArgs(InjectorImpl.java:558) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:463) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:129) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:332) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.lambda$0(E4Application.java:243) at java.util.Optional.ifPresent(Optional.java:159) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:242) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:153) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) at org.eclipse.equinox.launcher.Main.run(Main.java:1447) at org.eclipse.equinox.launcher.Main.main(Main.java:1420) org.eclipse.e4.core.di.InjectionException: Unable to process "AbrechnungLoadService.abrechnungService": no actual value was found for the argument "AbrechnungServiceInterface[@org.eclipse.e4.core.di.extensions.Service(filterExpression=, dynamic=true)]". at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:482) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:473) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:129) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveArgs(InjectorImpl.java:558) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:463) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:129) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:332) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42) at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.processActiveHandler(HandlerProcessingAddon.java:145) at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.handleContextEvent(HandlerProcessingAddon.java:127) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) at org.eclipse.e4.core.di.internal.extensions.EventObjectSupplier$DIEventHandler.handleEvent(EventObjectSupplier.java:92) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424) at org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl.setContext(WindowImpl.java:521) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:635) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:737) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:731) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1084) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:166) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) at org.eclipse.equinox.launcher.Main.run(Main.java:1447) at org.eclipse.equinox.launcher.Main.main(Main.java:1420) org.eclipse.e4.core.di.InjectionException: Unable to process "AbrechnungLoadService.abrechnungService": no actual value was found for the argument "AbrechnungServiceInterface[@org.eclipse.e4.core.di.extensions.Service(filterExpression=, dynamic=true)]". at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:482) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:473) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:129) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveArgs(InjectorImpl.java:558) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:463) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:129) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:332) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42) at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.processActiveHandler(HandlerProcessingAddon.java:145) at org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon.handleContextEvent(HandlerProcessingAddon.java:127) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) at org.eclipse.e4.core.di.internal.extensions.EventObjectSupplier$DIEventHandler.handleEvent(EventObjectSupplier.java:92) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424) at org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl.setContext(WindowImpl.java:521) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:635) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:737) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:731) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1084) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:166) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) at org.eclipse.equinox.launcher.Main.run(Main.java:1447) at org.eclipse.equinox.launcher.Main.main(Main.java:1420) 15:46:46.404;IMPORT_REGISTRATION;importedSR={com.evolit.klv.service.AbrechnungServiceInterface, com.evolit.klv.service.AnwenderEinstellungServiceInterface, com.evolit.klv.service.AuthenticationServiceInterface, com.evolit.klv.service.BetreiberServiceInterface, com.evolit.klv.service.LookupServiceInterface, com.evolit.klv.service.RechnungServiceInterface, com.evolit.klv.service.TerminalServiceInterface, com.evolit.klv.service.NebengebuehrServiceInterface, com.evolit.klv.service.ITEVorgangServiceInterface, com.evolit.klv.service.ReportingServiceInterface, com.evolit.klv.service.LogEndToEndServiceInterface, com.evolit.klv.service.AbrechnungKorrekturServiceInterface, com.evolit.klv.service.KundenServiceInterface}={service.intents=osgi.async, service.id=170, service.bundleid=85, service.scope=bundle, osgi.basic.timeout=1800000, service.imported.configs=[ecf.jaxrs.jersey.client], endpoint.id=[redacted], service.imported=org.eclipse.ecf.provider.jaxrs.client.JaxRSClientContainer$JaxRSClientRemoteService@fbce72};cID=URIID [uri=[redacted];rsId=0 --Endpoint Description--- <endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0"> <endpoint-description> <property name="ecf.endpoint.id.ns" value-type="String" value="ecf.namespace.jaxrs"/> <property name="ecf.endpoint.rsfilter" value-type="String" value="(objectClass=*)"/> <property name="ecf.rsvc.id" value-type="Long" value="0"/> <property name="endpoint.id" value-type="String" value="[redacted]"/> <property name="objectClass" value-type="String"> <array> <value>com.evolit.klv.service.AbrechnungServiceInterface</value> <value>com.evolit.klv.service.AnwenderEinstellungServiceInterface</value> <value>com.evolit.klv.service.AuthenticationServiceInterface</value> <value>com.evolit.klv.service.BetreiberServiceInterface</value> <value>com.evolit.klv.service.LookupServiceInterface</value> <value>com.evolit.klv.service.RechnungServiceInterface</value> <value>com.evolit.klv.service.TerminalServiceInterface</value> <value>com.evolit.klv.service.NebengebuehrServiceInterface</value> <value>com.evolit.klv.service.ITEVorgangServiceInterface</value> <value>com.evolit.klv.service.ReportingServiceInterface</value> <value>com.evolit.klv.service.LogEndToEndServiceInterface</value> <value>com.evolit.klv.service.AbrechnungKorrekturServiceInterface</value> <value>com.evolit.klv.service.KundenServiceInterface</value> </array> </property> <property name="osgi.basic.timeout" value-type="String" value="1800000"/> <property name="remote.configs.supported" value-type="String"> <array> <value>ecf.jaxrs.jersey.server</value> </array> </property> <property name="remote.intents.supported" value-type="String"> <array> <value>passByValue</value> <value>exactlyOnce</value> <value>ordered</value> <value>jaxrs</value> </array> </property> <property name="service.imported.configs" value-type="String"> <array> <value>ecf.jaxrs.jersey.client</value> </array> </property> <property name="service.intents" value-type="String" value="osgi.async"/> </endpoint-description> </endpoint-descriptions> ---End Endpoint Description
If I close the client and restart everything works fine. This happens perhaps one in ten times, perhaps even less and it is impossible for us to force it in our DEV environment, it NEVER happens when we start directly from Eclipse (tried literally dozens of time) only when we start the built client.
Unfortunately the above is the only "good" log I have of such an issue but it makes me think that there might be a race condition where the dependency injection already tries to inject while our services are not ready yet, what is your opinion here, is that possible?
Perhaps related to our startlevels?
![image](https://user-images.githubusercontent.com/5700667/135087368-6b2982ee-2f13-4867-b898-8e7bf1e49044.png)
Like for example the bundle handling the DI and the jersey bundles run at the same time and in 99% of the time jersey/ecf finishes before DI kicks in but just sometimes it doesn't? If so, what should we change on start-levels or is there another way we could prevent this?