title: java.lang.NullPointerException at com.sun.faces.config.ConfigManager$ProvideMetadataToAnnotationScanTask.initializeIvars after adding Weld
body: <p>I am trying to use OmniFaces for converters. However it will not initialize. I am running eclipse on Ubuntu. I have not implemented any converters or any other OmniFaces code in the project yet. But the intention is to use list converters and possibly other converters with PrimeFaces.</p>
  
  <p>This problem does not seem to be related to omnifaces however. It seems like it could be depending on multiple versions of JSF. However I only have mojarra in my project. Could it be any of the other dependencies that conflicts. The problem did not arrise until I tried to include omnifaces. Primefaces has been running without a problem.</p>
  
  <p>stacktrace</p>
  
  <pre><code>SEVERE: Critical error during deployment: 
  com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.NullPointerException
      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:453)
      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: javax.faces.FacesException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
      at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:516)
      at com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:446)
      at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:359)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
      at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:137)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152)
      at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:239)
      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439)
      ... 10 more
  Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
      at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      at java.util.concurrent.FutureTask.get(FutureTask.java:192)
      at com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:512)
      ... 17 more
  Caused by: java.lang.NullPointerException
      at com.sun.faces.config.ConfigManager$ProvideMetadataToAnnotationScanTask.initializeIvars(ConfigManager.java:877)
      at com.sun.faces.config.ConfigManager$ProvideMetadataToAnnotationScanTask.getAnnotationScanURIs(ConfigManager.java:890)
      at com.sun.faces.config.ConfigManager$ProvideMetadataToAnnotationScanTask.access$400(ConfigManager.java:834)
      at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:962)
      at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:916)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:387)
      ... 10 more
  
  &lt;!-- o:converter converterId="omnifaces.ListConverter" list="#{backingLeague.listLeague.source}" /  --&gt;
  </code></pre>
  
  <p>Dependency</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
          &lt;artifactId&gt;javax.faces&lt;/artifactId&gt;
          &lt;version&gt;2.2.11&lt;/version&gt;
      &lt;/dependency&gt;
          &lt;dependency&gt;  
          &lt;groupId&gt;org.primefaces&lt;/groupId&gt;  
          &lt;artifactId&gt;primefaces&lt;/artifactId&gt;  
          &lt;version&gt;5.2&lt;/version&gt;  
      &lt;/dependency&gt;
     &lt;dependency&gt;
          &lt;groupId&gt;org.omnifaces&lt;/groupId&gt;
          &lt;artifactId&gt;omnifaces&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.weld.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;weld-servlet&lt;/artifactId&gt;
          &lt;version&gt;2.2.15.Final&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Page include</p>
  
  <pre><code>&lt;h:html lang="sv-SE" 
      xmlns="http://www.w3c.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:o="http://omnifaces.org/ui"
      xmlns:of="http://omnifaces.org/functions"&gt;
  </code></pre>
  
  <p>context.xml</p>
  
  <pre><code>&lt;Context&gt;
      &lt;Resource name="BeanManager" 
          auth="Container"
          type="javax.enterprise.inject.spi.BeanManager"
          factory="org.jboss.weld.resources.ManagerObjectFactory" /&gt;
  &lt;/Context&gt;
  </code></pre>