I'm trying to better understand the root cause of
UnsatisfiedDepedencyException. For example, injecting
com.sun.enterprise.config.serverbeans.HttpService works fine in
HttpServiceConfigListener (which gets instantiated as the last step of
WebContainer.postConstruct()). However, HttpListener or VirtualServer
injection fails with the exception. Shouldn't HttpListener and
VirtualServer be available for injection by the time web container is
getting started?
[#|2008-08-18T13:28:26.417-0700|SEVERE||javax.enterprise.system.tools.deployment|_ThreadID=12;_ThreadName=Thread-3;|Cannot
start container web
org.jvnet.hk2.component.UnsatisfiedDepedencyException: Unsatisfied
dependency exception : public
com.sun.enterprise.config.serverbeans.HttpListener
com.sun.enterprise.web.reconfig.HttpServiceConfigListener.httpListener
at
org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:100)
at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:100)
at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)
at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
at
com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:662)
at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)
at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
at
org.glassfish.internal.data.ContainerInfo.getContainer(ContainerInfo.java:75)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.startContainers(ApplicationLifecycle.java:798)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:435)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:270)
at
com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:221)
at
com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:98)
at
com.sun.enterprise.v3.server.ApplicationLoaderInjector.postConstruct(ApplicationLoaderInjector.java:61)
at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)
at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:162)
at
com.sun.enterprise.v3.server.AppServerStartup$1.run(AppServerStartup.java:103)
Caused by: org.jvnet.hk2.component.UnsatisfiedDepedencyException:
Unsatisfied dependency exception : public
com.sun.enterprise.config.serverbeans.HttpListener
com.sun.enterprise.web.reconfig.HttpServiceConfigListener.httpListener
at
org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:95)
... 25 more