Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1689

Dependencies with module-info.class fail

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 2017.11.0
    • Fix Version/s: 2017.12.1
    • Component/s: None
    • Labels:
      None

      Description

      Similarly to https://issues.jboss.org/browse/SWARM-1500, libraries with module-info.class fail (but at runtime, SWARM-1500 was related to the fraction plugin).

      An application with dependencies to JSON-B / JSON-P and implementation (yasson) triggers an exception at application start:

      java -jar file-hosting-web-1.0-SNAPSHOT-swarm.jar
      java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:54)
              at org.wildfly.swarm.bootstrap.Main.run(Main.java:133)
              at org.wildfly.swarm.bootstrap.Main.main(Main.java:86)
      Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 18
              at org.wildfly.swarm.Swarm.initializeConfigView(Swarm.java:636)
              at org.wildfly.swarm.Swarm.<init>(Swarm.java:255)
              at org.wildfly.swarm.Swarm.<init>(Swarm.java:193)
              at org.wildfly.swarm.Swarm.<init>(Swarm.java:180)
              at org.wildfly.swarm.Swarm.main(Swarm.java:730)
              ... 7 more
      Caused by: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 18
              at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1416)
              at org.jboss.jandex.Indexer.index(Indexer.java:1450)
              at org.wildfly.swarm.Swarm.initializeConfigFiltersFatJar(Swarm.java:656)
              at org.wildfly.swarm.Swarm.initializeConfigFilters(Swarm.java:642)
              at org.wildfly.swarm.Swarm.initializeConfigView(Swarm.java:633)
              ... 11 more
      Exception in thread "main" java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:54)
              at org.wildfly.swarm.bootstrap.Main.run(Main.java:133)
              at org.wildfly.swarm.bootstrap.Main.main(Main.java:86)
      Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 18
              at org.wildfly.swarm.Swarm.initializeConfigView(Swarm.java:636)
              at org.wildfly.swarm.Swarm.<init>(Swarm.java:255)
              at org.wildfly.swarm.Swarm.<init>(Swarm.java:193)
              at org.wildfly.swarm.Swarm.<init>(Swarm.java:180)
              at org.wildfly.swarm.Swarm.main(Swarm.java:730)
              ... 7 more
      Caused by: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 18
              at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1416)
              at org.jboss.jandex.Indexer.index(Indexer.java:1450)
              at org.wildfly.swarm.Swarm.initializeConfigFiltersFatJar(Swarm.java:656)
              at org.wildfly.swarm.Swarm.initializeConfigFilters(Swarm.java:642)
              at org.wildfly.swarm.Swarm.initializeConfigView(Swarm.java:633)
              ... 11 more
      

      Manually changing Jandex from 2.0.2 to 2.0.4 in the generated uber jar solves the problem.

      I submitted a pull request that workarounds this in a similar way to what was done in SWARM-1500 (https://github.com/wildfly-swarm/wildfly-swarm/pull/703). Upgrading to Jandex 2.0.4 would probably be better.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ymajoros Yannick Majoros
                  Reporter:
                  ymajoros Yannick Majoros
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: