dev@glassfish.java.net

_at_Attribute.key() -- startup fails if server is annotated

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Mon, 24 Mar 2008 15:26:39 -0700

If I annotated
com.sun.enterprise.config.serverbeans.serverbeans.Server.getName()
with key()=true, the server fails to start:


public interface Server extends ConfigBeanProxy, Injectable {

     /**
      * Gets the value of the name property.
      *
      * @return possible object is
      * {_at_link String }
      */
     @Attribute(required = true, key=true)
     public String getName();


INFO: Cannot inject com.sun.enterprise.config.serverbeans.Server
com.sun.enterprise.v3.services.impl.ApplicationLoaderService.server in
componentApplication Loader
Mar 24, 2008 3:24:26 PM
SEVERE: org.jvnet.hk2.component.UnsatisfiedDepedencyException:
Unsatisfied dependency exception :
com.sun.enterprise.config.serverbeans.Server
com.sun.enterprise.v3.services.impl.ApplicationLoaderService.server
Mar 24, 2008 3:24:26 PM
SEVERE: at
org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:
86)
Mar 24, 2008 3:24:26 PM
SEVERE: at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:64)
Mar 24, 2008 3:24:26 PM
SEVERE: at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:
50)
Mar 24, 2008 3:24:26 PM
SEVERE: at
com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:39)
Mar 24, 2008 3:24:26 PM
SEVERE: at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:
22)
Mar 24, 2008 3:24:26 PM
SEVERE: at
com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:71)
Mar 24, 2008 3:24:26 PM
SEVERE: at
com
.sun
.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:
24)
Mar 24, 2008 3:24:26 PM
SEVERE: at
com
.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:95)
Mar 24, 2008 3:24:26 PM
SEVERE: at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:
401)
Mar 24, 2008 3:24:26 PM
SEVERE: at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:
364)
Mar 24, 2008 3:24:26 PM
SEVERE: at com.sun.enterprise.module.bootstrap.Main.start(Main.java:
153)
Mar 24, 2008 3:24:26 PM
SEVERE: at com.sun.enterprise.module.bootstrap.Main$1.run(Main.java:68)
Mar 24, 2008 3:24:26 PM
SEVERE: Caused by:
org.jvnet.hk2.component.UnsatisfiedDepedencyException: Unsatisfied
dependency exception : com.sun.enterprise.config.serverbeans.Server
com.sun.enterprise.v3.services.impl.ApplicationLoaderService.server
Mar 24, 2008 3:24:26 PM
SEVERE: at
org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:
81)
Mar 24, 2008 3:24:26 PM
SEVERE: ... 11 more

---
Lloyd L Chambers
lloyd.chambers_at_sun.com
Sun Microsystems, Inc