title: Error deploying MyFaces CODI + Weld + JSF in Apache Tomcat 7
body: <p>I'm new using JSF and I noticed that the JSF doesn't provide some useful annotations, like @ViewAccessScoped (CODI). For use the CODI, I need to use the CDI dependency, so I configured my project with Weld.</p>
  
  <p>Then, <strong><em>JSF + Weld + Tomcat 7 works fine</em></strong>, changing annotations scope to Weld annotations, @ManagedBean to @Named and @NamedProperty to @Inject.</p>
  
  <p>Otherwise, When I try to deploy my Tomcat server now with CODI, I have the following stack trace (using the CODI library like @ViewAccessScoped annotation or not) and the server shutdown:</p>
  
  <pre><code>Mai 22, 2014 12:03:28 AM 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: /usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
  Mai 22, 2014 12:03:28 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:BioRequestWeld' did not find a matching property.
  Mai 22, 2014 12:03:28 AM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  Mai 22, 2014 12:03:28 AM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  Mai 22, 2014 12:03:28 AM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 469 ms
  Mai 22, 2014 12:03:28 AM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Mai 22, 2014 12:03:28 AM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.53
  Mai 22, 2014 12:03:30 AM org.jboss.weld.environment.servlet.EnhancedListener onStartup
  INFO: Initialize Weld using ServletContainerInitializer
  Mai 22, 2014 12:03:30 AM org.jboss.weld.bootstrap.WeldStartup &lt;clinit&gt;
  INFO: WELD-000900: 2.2.1 (Final)
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.WeldStartup startContainer
  INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.interceptor.util.InterceptionTypeRegistry &lt;clinit&gt;
  WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
  Mai 22, 2014 12:03:31 AM org.jboss.weld.interceptor.util.InterceptionTypeRegistry &lt;clinit&gt;
  WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
  Mai 22, 2014 12:03:31 AM org.jboss.weld.event.ExtensionObserverMethodImpl checkRequiredTypeAnnotations
  WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.PhaseListenerExtension.filterJsfPhaseListeners(@Observes ProcessAnnotatedType&lt;Object&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.event.ExtensionObserverMethodImpl checkRequiredTypeAnnotations
  WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.apache.myfaces.extensions.cdi.jsf.impl.config.view.ViewConfigExtension.processPageDefinitions(@Observes ProcessAnnotatedType&lt;Object&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.event.ExtensionObserverMethodImpl checkRequiredTypeAnnotations
  WARN: WELD-000411: Observer method [BackedAnnotatedMethod] protected org.apache.myfaces.extensions.cdi.core.impl.activation.ActivationExtension.vetoAlternativeTypes(@Observes ProcessAnnotatedType&lt;Object&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.event.ExtensionObserverMethodImpl checkRequiredTypeAnnotations
  WARN: WELD-000411: Observer method [BackedAnnotatedMethod] protected org.apache.myfaces.extensions.cdi.jsf2.impl.scope.mapped.MappedJsf2ScopeExtension.convertJsf2Scopes(@Observes ProcessAnnotatedType&lt;Object&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.event.ExtensionObserverMethodImpl checkRequiredTypeAnnotations
  WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.apache.myfaces.extensions.cdi.core.impl.CodiDeactivatorExtension.filter(@Observes ProcessAnnotatedType&lt;Object&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  Mai 22, 2014 12:03:31 AM org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider &lt;clinit&gt;
  INFO: org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider installed successfully.
  Mai 22, 2014 12:03:31 AM org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider &lt;clinit&gt;
  INFO: org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext installed successfully.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.InjectableValidator because of underlying class loading error: Type javax.validation.Validator not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.InjectableValidatorFactory because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jsf.impl.bv.resolver.InvalidValueAwareValidatorFactory because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.InjectableMessageInterpolator because of underlying class loading error: Type javax.validation.MessageInterpolator not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jsf.impl.bv.resolver.InvalidValueAwareValidatorContext because of underlying class loading error: Type javax.validation.ValidatorContext not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jsf.impl.bv.resolver.JsfValidatorFactoryProducer because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.CdiAwareValidatorFactory$1 because of underlying class loading error: Type javax.validation.ConstraintValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jpa.impl.EntityManagerEntry because of underlying class loading error: Type javax.persistence.EntityManager not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.ValidatorFactoryStorage because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.CdiAwareBeanValidationProducer because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jsf.impl.bv.InvalidValueAwareMessageInterpolator because of underlying class loading error: Type javax.validation.MessageInterpolator not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.api.ClassLevelConstraintValidator because of underlying class loading error: Type javax.validation.ConstraintValidator not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jsf.impl.bv.resolver.SerializableValidatorFactory because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jpa.impl.LegacyTransactionalInterceptorStrategy because of underlying class loading error: Type javax.persistence.EntityManager not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.InjectableConstraintValidatorFactory because of underlying class loading error: Type javax.validation.ConstraintValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.InjectionAwareConstraintValidatorFactory because of underlying class loading error: Type javax.validation.ConstraintValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.SerializableValidatorFactory because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.AdvancedValidatorContext because of underlying class loading error: Type javax.validation.ValidatorContext not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.ValidatorFactoryResolver because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jpa.impl.transaction.TransactionalInterceptorStrategy because of underlying class loading error: Type javax.persistence.EntityManager not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.jpa.impl.PersistenceHelper because of underlying class loading error: Type javax.persistence.EntityManager not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.jboss.weld.bootstrap.MissingDependenciesRegistry handleResourceLoadingException
  INFO: WELD-000119: Not generating any bean definitions from org.apache.myfaces.extensions.cdi.bv.impl.CdiAwareValidatorFactory because of underlying class loading error: Type javax.validation.ValidatorFactory not found.  If this is unexpected, enable DEBUG logging to see the full error.
  Mai 22, 2014 12:03:31 AM org.apache.myfaces.extensions.cdi.core.impl.projectstage.ProjectStageProducer initProjectStage
  INFO: Computed the following CODI ProjectStage: Production
  Mai 22, 2014 12:03:31 AM org.jboss.weld.environment.tomcat.TomcatContainer initialize
  INFO: Tomcat 7+ detected, CDI injection will be available in Servlets, Filters and Listeners.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.core.ContainerBase startInternal
  SEVERE: A child container failed during start
  java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/BioRequest]]
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
      at java.util.concurrent.FutureTask.get(FutureTask.java:111)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      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:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:724)
  Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/BioRequest]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      ... 7 more
  Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type PersistenceStrategy with qualifiers @Default
    at injection point [BackedAnnotatedField] @Inject private org.apache.myfaces.extensions.cdi.jpa.impl.transaction.TransactionalInterceptor.persistenceStrategy
    at org.apache.myfaces.extensions.cdi.jpa.impl.transaction.TransactionalInterceptor.persistenceStrategy(TransactionalInterceptor.java:0)
  
      at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:370)
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:291)
      at org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:567)
      at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:85)
      at org.jboss.weld.bootstrap.ConcurrentValidator$2.doWork(ConcurrentValidator.java:83)
      at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
      at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
      ... 5 more
  
  Mai 22, 2014 12:03:32 AM org.apache.catalina.core.ContainerBase startInternal
  SEVERE: A child container failed during start
  java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
      at java.util.concurrent.FutureTask.get(FutureTask.java:111)
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
  Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      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:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:724)
  Caused by: org.apache.catalina.LifecycleException: A child container failed during start
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
      at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 7 more
  
  Mai 22, 2014 12:03:32 AM org.apache.catalina.startup.Catalina start
  SEVERE: The required Server component failed to start so Tomcat is unable to start.
  org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
  Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 7 more
  Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 9 more
  Caused by: org.apache.catalina.LifecycleException: A child container failed during start
      at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
      at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 11 more
  
  Mai 22, 2014 12:03:32 AM org.apache.coyote.AbstractProtocol pause
  INFO: Pausing ProtocolHandler ["http-bio-8080"]
  Mai 22, 2014 12:03:32 AM org.apache.coyote.AbstractProtocol pause
  INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
  Mai 22, 2014 12:03:32 AM org.apache.catalina.core.StandardService stopInternal
  INFO: Stopping service Catalina
  Mai 22, 2014 12:03:32 AM org.apache.coyote.AbstractProtocol destroy
  INFO: Destroying ProtocolHandler ["http-bio-8080"]
  Mai 22, 2014 12:03:32 AM org.apache.coyote.AbstractProtocol destroy
  INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-1] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-2] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-3] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-4] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-5] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-6] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-7] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-worker-8] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-preloader-1] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-preloader-2] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-preloader-3] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-preloader-4] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-preloader-5] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-preloader-6] but has failed to stop it. This is very likely to create a memory leak.
  Mai 22, 2014 12:03:32 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BioRequest] appears to have started a thread named [weld-preloader-7] but has failed to stop it. This is very likely to create a memory leak.
  </code></pre>
  
  <p>It's a very strange error log.<br/>
  <strong><em>The main point is: What can I do to use CODI with JSF under Tomcat 7?</em></strong> I want to use the annotation @ViewAccessScoped provided by CODI.<br/>
  Is CODI compatible with Weld? It's a really strange stack trace, because without CODI, everything works fine.</p>
  
  <p>When I try to Deploy my project with JSF + CODI + Tomcat 7, it's expected that I will have some error, because CODI works over some CDI library (but my project works, without using CODI). Then, the main piece of the stacktrace reproduced is:</p>
  
  <pre><code>Mai 22, 2014 1:18:18 AM com.sun.faces.config.AnnotationScanner processClassList
  SEVERE: Unable to load annotated class: org.apache.myfaces.extensions.cdi.jsf2.impl.scope.mapped.MappedJsf2ScopeExtension, reason: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/Extension
  Mai 22, 2014 1:18:18 AM com.sun.faces.config.ConfigureListener contextInitialized
  SEVERE: Critical error during deployment: 
  com.sun.faces.config.ConfigurationException: Factory'javax.faces.context.FacesContextFactory' was not configured properly.
  </code></pre>
  
  <p>The libraries that I'm using are listed bellow:</p>
  
  <pre><code>    Weld:   weld-servlet-2.2.1.Final.jar
      CODI:   myfaces-extcdi-bundle-jsf20-1.0.6.jar
      JSF:    javax.faces-2.2.6.jar
      Tomcat: apache-tomcat-7.0.53
  </code></pre>
  
  <p>I tried <strong><em>using TomEE and</em></strong> the only library that I needed was <strong><em>myfaces-extcdi-bundle-jsf20-1.0.6.jar</em></strong> and after <strong><em>everything worked fine</em></strong>.</p>
  
  <p>Otherwise I can't use JSF v2.2+. The <strong><em>currently</em></strong> configured <strong><em>JSF version with TomEE is 2.1</em></strong>. So, I don't want to migrate to TomEE, because the tag <strong><em> can be accessed only in the versions 2.2+</em></strong>.  </p>