title: NoClassDefFoundError: com/sun/jersey/spi/spring/container/SpringComponentProviderFactory
body: <p><strong>Problem</strong>: I have a JAX-RS Web Application running on Glassfish, developed using Intellij IDEA.
  The server was working fine until I added support for Enunciate. The moment I added "enunciate:docs enunciate:assemble" maven goal to be run before Make and Deploy Artifact steps, all hell broke loose. On every re-deploy, I get the below errors. Even after removing the enunciate maven goals, I still get them...</p>
  
  <p><strong>Question</strong>: What the hell causes this, because I don't even use Spring (SpringComponentProviderFactory) ?</p>
  
  <p><strong>Edit</strong>: This is still not fixed. Any other ideas ?</p>
  
  <pre><code>Artifact project:war exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Ref&lt;ContainerRequest&gt;] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject org.glassfish.jersey.server.internal.routing.UriRoutingContext(Ref&lt;ContainerRequest&gt;, ProcessingProviders)]. Please see server.log for more details.
  </code></pre>
  
  <p>At the same time, in the server logs I get:</p>
  
  <pre><code>[2014-04-15T20:31:29.252+0300] [glassfish 4.0] [WARNING] [AS-DEPLOYMENT-00011] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583089252] [levelValue: 900] [[
    Error in annotation processing: {0}.
  java.lang.NoClassDefFoundError: com/sun/jersey/spi/spring/container/SpringComponentProviderFactory
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1183)
      at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1728)
      at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)
      at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:297)
      at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:585)
      at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462)
      at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
      at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338)
      at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91)
      at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420)
      at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
      at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
      at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
      at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:198)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:878)
  [2014-04-15T20:31:30.214+0300] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583090214] [levelValue: 900] [[
    The web application [unknown] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.]]
  
  [2014-04-15T20:31:30.215+0300] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583090215] [levelValue: 900] [[
    The web application [unknown] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.]]
  
  [2014-04-15T20:31:31.947+0300] [glassfish 4.0] [WARNING] [] [org.glassfish.weld.BeanDeploymentArchiveImpl] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583091947] [levelValue: 900] [[
    AS-CDI-005]]
  
  [2014-04-15T20:31:36.583+0300] [glassfish 4.0] [WARNING] [] [org.jboss.weld.interceptor.util.InterceptionTypeRegistry] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583096583] [levelValue: 900] [[
    Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled]]
  
  [2014-04-15T20:31:36.584+0300] [glassfish 4.0] [WARNING] [] [org.jboss.weld.interceptor.util.InterceptionTypeRegistry] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583096584] [levelValue: 900] [[
    Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled]]
  
  [2014-04-15T20:31:37.341+0300] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=35 _ThreadName=admin-listener(4)] [timeMillis: 1397583097341] [levelValue: 1000] [[
    Exception during lifecycle processing
  org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Ref&lt;ContainerRequest&gt;] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject org.glassfish.jersey.server.internal.routing.UriRoutingContext(Ref&lt;ContainerRequest&gt;, ProcessingProviders)]
      at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:225)
      at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
  </code></pre>