title: Dependency Injection won't work on Tomcat 7 using Jersey and OpenWebBeans
body: <p>I'm somewhat stuck with my problem. I try to run a RESTful webservice using Jersey and combine this with some Dependency Injection using OpenWebBeans on Tomcat7. The Jersey Part itself seems to work well, but when I create the beans.xml file i get the below mentioned errors...</p>
  
  <p>So here we go:</p>
  
  <p>I created the project using Maven in Eclipse:</p>
  
  <p>File->New->Other->Maven Project->maven-archetype-webapp 
  and added the src/main/java folder</p>
  
  <p>The file tree looks like this:</p>
  
  <blockquote>
    <p>TJOWB <br/> 
    |-Deployment Descriptor <br/>
    |-Java Resources <br/>
    |---src/main/resources <br/>
    |-----META-INF <br/>
    |-------beans.xml <br/>
    |---src/main/java <br/>
    |-----a.b.c <br/>
    |-------Greeting.java <br/>
    |-------Hello.java <br/>
    |---Libraries <br/>
    |-JavaScript Resources <br/>
    |-Deployment Resources <br/>
    |-pom.xml <br/>
    |-src <br/>
    |-main <br/>
    |---java <br/>
    |---resources <br/>
    |-----META-INF <br/>
    |-------beans.xml <br/>
    |---webapp <br/>
    |-----index.jsp <br/>
    |-----WEB-INF <br/>
    |-------beans.xml <br/>
    |-------web.xml <br/>
    |-target</p>
  </blockquote>
  
  <p>The pom.xml file: </p>
  
  <p>(project definition is missing here in stackoverflow due to I don't know, sorry)</p>
  
  
  
  <pre><code>&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;a.b.c&lt;/groupId&gt;
  &lt;artifactId&gt;TJOWB&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;TJOWB Maven Webapp&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-servlet&lt;/artifactId&gt;
          &lt;version&gt;1.12&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
          &lt;version&gt;1.12&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;6.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.openwebbeans&lt;/groupId&gt;
          &lt;artifactId&gt;openwebbeans-tomcat7&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.openwebbeans&lt;/groupId&gt;
          &lt;artifactId&gt;openwebbeans-impl&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
          &lt;artifactId&gt;geronimo-interceptor_1.1_spec&lt;/artifactId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.openwebbeans&lt;/groupId&gt;
          &lt;artifactId&gt;openwebbeans-web&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
          &lt;artifactId&gt;geronimo-servlet_3.0_spec&lt;/artifactId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.openwebbeans&lt;/groupId&gt;
          &lt;artifactId&gt;openwebbeans-ee-common&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
          &lt;artifactId&gt;geronimo-jcdi_1.0_spec&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
          &lt;version&gt;1.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
          &lt;artifactId&gt;geronimo-atinject_1.0_spec&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
          &lt;version&gt;1.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.openwebbeans&lt;/groupId&gt;
          &lt;artifactId&gt;openwebbeans-spi&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.openwebbeans&lt;/groupId&gt;
          &lt;artifactId&gt;openwebbeans-resource&lt;/artifactId&gt;
          &lt;version&gt;1.1.3&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
      &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  
      &lt;finalName&gt;TJOWB&lt;/finalName&gt;
     &lt;/build&gt;
  </code></pre>
  
  <p>The web.xml:</p>
  
  <p></p>
  
  <p>
      Archetype Created Web Application</p>
  
  <pre><code>&lt;listener&gt;
      &lt;listener-class&gt;org.apache.webbeans.web.tomcat.ContextLifecycleListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;TestServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
          &lt;param-value&gt;a.b.c&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;TestServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p></p>
  
  <p>Added in </p>
  
  <p>Tomcat /lib:</p>
  
  <blockquote>
    <p>geronimo-atinject_1.0_spec-1.0.jar <br />
    geronimo-interceptor_1.1_spec-1.0.jar <br />
    geronimo-interceptor_3.0_spech-1.0.jar <br />
    geronimo-jcdi_1.0_spec-1.0.jar <br />
    javassist_3.12.1.GA.jar <br />
    openwebbeans-impl-1.1.3.jar <br />
    openwebbeans-resource-1.1.3.jar <br />
    openwebbeans-spi-1.1.3.jar <br />
    openwebbeans-tomcat7-1.1.3.jar <br />
    openwebbeans-web-1.1.3.jar <br />
    scannotation-1.0.2.jar <br /></p>
  </blockquote>
  
  <p>In Tomcat /conf/server.xml</p>
  
  <blockquote>
    <p>Listener className="org.apache.webbeans.web.tomcat.ContextLifecycleListener" /</p>
  </blockquote>
  
  <p>Hello.java:</p>
  
  <pre><code>package a.b.c;
  
  import javax.annotation.ManagedBean; 
  import javax.annotation.PostConstruct; 
  import javax.inject.Inject; 
  import javax.ws.rs.GET; 
  import javax.ws.rs.Path; 
  import javax.ws.rs.Produces; 
  import javax.ws.rs.core.MediaType; 
  
  @Path("inject") 
  public class Hello {
  
      @Inject
      private Greeting mGreeting;
  
      public Hello() {
  
      }
  
      @PostConstruct
      public void init() {
  
      }
  
      @GET
      @Produces(MediaType.TEXT_PLAIN)
      public String sayPlainTextHello() {
         if (mGreeting != null)
              return mGreeting.greetUser();
          else
              return "Dependency Injection failed";
      }
  }
  </code></pre>
  
  <p>Greeting.java:</p>
  
  <pre><code>package a.b.c;
  
  public class Greeting {
  
      public String greetUser() {
          return "Hello";
      }
  }
  </code></pre>
  
  <p>So, and now the actual error messages:</p>
  
  <p>If there is no beans.xml in src/main/webapp/WEB-INF the application works fine. At least it starts and Jersey works ;)</p>
  
  <p>But once I create the beans.xml ((as I have to, I suppose)the beans.xml contains just the beans tags which i can't show here (because I don't know how) and is otherwise emtpy) I get the following stacktrace:</p>
  
  <p>Tomcat7 startup:</p>
  
  <pre><code>Mrz 22, 2012 1:58:00 PM org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in           production environments was not found on the java.library.path:         C:\glassfish3\jdk7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program     Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program     Files/Java/jre6/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS    \System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program     Files\apache-maven-2.2.1-bin\apache-maven-    2.2.1\bin;C:\glassfish3\jdk7\bin;C:\Users\mvesper\Desktop\IndigoEE;;.
  Mrz 22, 2012 1:58:00 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property     'source' to 'org.eclipse.jst.j2ee.server:TJOWB' did not find a matching property.
  Mrz 22, 2012 1:58:00 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  Mrz 22, 2012 1:58:00 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  Mrz 22, 2012 1:58:00 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 421 ms
  Mrz 22, 2012 1:58:00 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Mrz 22, 2012 1:58:00 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
  Mrz 22, 2012 1:58:01 PM org.apache.webbeans.web.lifecycle.WebContainerLifecycle     startApplication
  INFO: OpenWebBeans Container is starting...
  Mrz 22, 2012 1:58:01 PM org.apache.webbeans.plugins.PluginLoader startUp
  INFO: Adding OpenWebBeansPlugin : [TomcatWebPlugin]
  Mrz 22, 2012 1:58:01 PM org.apache.webbeans.web.scanner.WebScannerService     addWebBeansXmlLocation
  INFO: added beans.xml marker:     file:/C:/Users/mvesper/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpweb    apps/TJOWB/WEB-INF/classes/META-INF/beans.xml
  Mrz 22, 2012 1:58:01 PM org.apache.webbeans.web.scanner.WebScannerService     addWebBeansXmlLocation
  INFO: added beans.xml marker: jndi:/localhost/TJOWB/WEB-INF/beans.xml
  Mrz 22, 2012 1:58:01 PM org.apache.webbeans.config.BeansDeployer     validateInjectionPoints
  INFO: All injection points were validated successfully.
  Mrz 22, 2012 1:58:01 PM org.apache.webbeans.web.lifecycle.WebContainerLifecycle     startApplication
  INFO: OpenWebBeans Container has started, it took [247] ms.
  Mrz 22, 2012 1:58:01 PM com.sun.jersey.api.core.PackagesResourceConfig init
  INFO: Scanning for root resource and provider classes in the packages:
    a.b.c
  Mrz 22, 2012 1:58:01 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
  INFO: Root resource classes found:
    class a.b.c.Hello
  Mrz 22, 2012 1:58:01 PM com.sun.jersey.api.core.ScanningResourceConfig init
  INFO: No provider classes found.
  Mrz 22, 2012 1:58:01 PM     com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer initialize
  INFO: CDI support is enabled
  Mrz 22, 2012 1:58:01 PM com.sun.jersey.server.impl.application.WebApplicationImpl     _initiate
  INFO: Initiating Jersey application, version 'Jersey: 1.12 02/15/2012 04:51 PM'
  Mrz 22, 2012 1:58:02 PM org.apache.catalina.core.ApplicationContext log
  SEVERE: StandardWrapper.Throwable
  java.lang.NoClassDefFoundError: javax/annotation/ManagedBean
      at             com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.getComponentProvider(     tProviderFactory.java:116)
      at         com.sun.jersey.server.impl.component.IoCResourceFactory.getComponentProvider(IoCResourceFac    tory.java:76)
      at     com.sun.jersey.server.impl.application.WebApplicationImpl.getResourceComponentProvider(WebA    pplicationImpl.java:582)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.initiateResource(WebApplicationImpl.java:660)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.initiateResource(WebApplicationImpl.java:655)
  at com.sun.jersey.server.impl.application.RootResourceUriRules.&lt;init&gt;(RootResourceUriRules.java:124)
  at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1308)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
  at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
  at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
  at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
  at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
  at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
  at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
  at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
  at javax.servlet.GenericServlet.init(GenericServlet.java:160)
  at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.ClassNotFoundException: javax.annotation.ManagedBean
  at     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
  at     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
  ... 33 more
  
  Mrz 22, 2012 1:58:02 PM org.apache.catalina.core.StandardContext loadOnStartup
  SEVERE: Servlet /TJOWB threw load() exception
  java.lang.ClassNotFoundException: javax.annotation.ManagedBean
  at     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
  at     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
  at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.getComponentProvider(CDIComponentProviderFactory.java:116)
  at com.sun.jersey.server.impl.component.IoCResourceFactory.getComponentProvider(IoCResourceFactory.java:76)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.getResourceComponentProvider(WebApplicationImpl.java:582)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.initiateResource(WebApplicationImpl.java:660)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.initiateResource(WebApplicationImpl.java:655)
  at com.sun.jersey.server.impl.application.RootResourceUriRules.&lt;init&gt;(RootResourceUriRules.java:124)
  at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1308)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
  at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
  at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
  at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
  at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
  at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
  at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
  at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
  at javax.servlet.GenericServlet.init(GenericServlet.java:160)
  at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
  
  Mrz 22, 2012 1:58:02 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  Mrz 22, 2012 1:58:02 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Mrz 22, 2012 1:58:02 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 1212 ms
  </code></pre>
  
  <p>And when i try to acces localhost:8080/TJOWB/rest/inject:</p>
  
  <pre><code>Mrz 22, 2012 2:11:29 PM com.sun.jersey.api.core.PackagesResourceConfig init
  INFO: Scanning for root resource and provider classes in the packages:
    a.b.c
  Mrz 22, 2012 2:11:29 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
  INFO: Root resource classes found:
    class a.b.c.Hello
  Mrz 22, 2012 2:11:29 PM com.sun.jersey.api.core.ScanningResourceConfig init
  INFO: No provider classes found.
  Mrz 22, 2012 2:11:29 PM org.apache.catalina.core.ApplicationContext log
  SEVERE: StandardWrapper.Throwable
  java.lang.RuntimeException: javax.naming.NameNotFoundException: Name CDIExtension is     not bound in this Context
      at     com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:177)
      at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.&lt;init&gt;    (CDIComponentProviderFactory.java:92)
      at     com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
  at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:574)
  at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:311)
  at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:606)
  at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
  at javax.servlet.GenericServlet.init(GenericServlet.java:160)
  at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
  at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
  Caused by: javax.naming.NameNotFoundException: Name CDIExtension is not bound in this Context
  at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
  at com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:175)
  ... 26 more
  
  Mrz 22, 2012 2:11:29 PM org.apache.catalina.core.StandardWrapperValve invoke
  SEVERE: Allocate exception for servlet TestServlet
  javax.naming.NameNotFoundException: Name CDIExtension is not bound in this Context
  at org.apache.naming.NamingContext.lookup(NamingContext.java:820)
  at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
  at com.sun.jersey.server.impl.cdi.CDIExtension.getInitializedExtension(CDIExtension.java:175)
  at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.&lt;init&gt;(CDIComponentProviderFactory.java:92)
  at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:75)
  at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:574)
  at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.configure(ServletContainer.java:311)
  at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:606)
  at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
  at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
  at javax.servlet.GenericServlet.init(GenericServlet.java:160)
  at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
  at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>So, I quess this is it.</p>
  
  <p>Please excuse my english and the formatting.</p>
  
  <p>Thanks in advance!</p>