1 Reply Latest reply on Oct 11, 2016 11:10 AM by Matej Novotny

    org.jboss.jandex.Index cannot be cast to org.jboss.jandex.IndexView

    Bruce Springfield Apprentice

      I am getting an error when I try to initialize a WeldContainer:

       

      java.lang.ClassCastException: org.jboss.jandex.Index cannot be cast to org.jboss.jandex.IndexView

          at org.jboss.weld.environment.deployment.discovery.jandex.JandexDiscoveryStrategy.beforeDiscovery(JandexDiscoveryStrategy.java:78)

          at org.jboss.weld.environment.deployment.discovery.AbstractDiscoveryStrategy.performDiscovery(AbstractDiscoveryStrategy.java:117)

          at org.jboss.weld.environment.se.Weld.createDeployment(Weld.java:678)

          at org.jboss.weld.environment.se.Weld.initialize(Weld.java:570)

       

      Here is my code:

       

              Weld weld1 = new Weld();

              WeldContainer container = weld1.containerId("alpha").initialize();

       

      Any ideas what I am doing wrong or how to fix the problem?