4 Replies Latest reply on Nov 29, 2017 1:22 AM by Thomas Zauner

    Problems with CDI Builder and scanning Jars which support Java 9

    Thomas Zauner Newbie

      Setup:

      • Eclipse Oxygen 4.7.1
      • JBoss Tools 4.5.1.Final (also tested with latest development version 4.5.2.AM1)
      • An maven web application with certain dependencies
        • So far, we found two dependencies, which lead to this jandex scaning error after upgrading to latest version
        • org.apache.logging.log4j version 2.10.0
        • org.ow2.asm version 6.0

       

      This leads to an CDI Builder IllegalStateException - see exception trace below.

      Both dependencies started support for Java 9, which seems to cause this exception.

       

      [ANNOUNCEMENT] Apache Log4j 2.10.0 released

       

      Is this the right place to start with  or should I create an issue somewhere?

       

       

      !MESSAGE Errors running builder 'CDI (Contexts and Dependency Injection) Builder' on project 'Webapp'.

      !STACK 0

      java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 24

              at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:665)

              at org.jboss.jandex.Indexer.index(Indexer.java:699)

              at org.jboss.tools.common.core.jandex.JandexUtil.createJarIndex(JandexUtil.java:56)

              at org.jboss.tools.common.core.jandex.JandexUtil.hasAnnotation(JandexUtil.java:104)

              at org.jboss.tools.cdi.internal.core.scanner.lib.BeanArchiveDetector.hasAnnotatedBeans(BeanArchiveDetector.java:276)

              at org.jboss.tools.cdi.internal.core.scanner.lib.BeanArchiveDetector.resolve(BeanArchiveDetector.java:203)

              at org.jboss.tools.cdi.internal.core.scanner.lib.ClassPathMonitor.detectBeanModule(ClassPathMonitor.java:150)

              at org.jboss.tools.cdi.internal.core.scanner.lib.ClassPathMonitor.process(ClassPathMonitor.java:106)

              at org.jboss.tools.cdi.core.CDICoreBuilder.build(CDICoreBuilder.java:215)

              at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)

              at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

              at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)

              at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)

              at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)

              at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

              at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)

              at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)

              at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)

              at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)

              at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)

              at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)