Hello,

I'm failing to create simple web app and deploy it to Geronimo. I'm trying to create simple servlet, and inject POJO using CDI.

Here is my Servlet class:

@WebServlet("/TestServlet")
public class TestServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;
      
    @Inject
    private InjectableInterface inj;
 
    public TestServlet() {
        super();
    }
}

Here is InjectableInterface.java:

public interface InjectableInterface {

}

Here is implementation of interface:

@Default
public class Injectable implements InjectableInterface {

}

But when I deploy war to geronimo 3, i get this exception:

javax.enterprise.inject.UnsatisfiedResolutionException: Api type [test.InjectableInterface] is not found with the qualifiers 
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  inj, Bean Owner : [TestServlet, Name:null, WebBeans Type:MANAGED, API Types:[], Qualifiers:[]]
	org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException(InjectionExceptionUtils.java:92)
	org.apache.webbeans.container.ResolutionUtil.checkResolvedBeans(ResolutionUtil.java:98)
	org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:265)
	org.apache.webbeans.inject.OWBInjector.getInjectedObjectReference(OWBInjector.java:229)
	org.apache.webbeans.inject.OWBInjector.inject(OWBInjector.java:146)
	org.apache.webbeans.inject.OWBInjector.inject(OWBInjector.java:94)
	org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:185)
	org.apache.geronimo.tomcat.TomcatInstanceManager.newInstance(TomcatInstanceManager.java:74)
	org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:850)
	org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:48)
	org.apache.geronimo.tomcat.valve.ProtectedTargetValve.invoke(ProtectedTargetValve.java:53)

What I'm doing wrong? Could anyone help me?

Admrolas