Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4477

artemis-commons does not transform the META-INF/services/javax.json.spi.JsonProvider to the shaded package

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.31.1
    • 2.31.2
    • Broker
    • None

    Description

      Johnzon is shaded in artemis-common but the META-INF/services/javax.json.spi.JsonProvider included in the artemis-commons JAR points to the original class, not the shaded one, causing the following error when used as a dependency:

      Caused by: java.util.ServiceConfigurationError: javax.json.spi.JsonProvider: Provider org.apache.johnzon.core.JsonProviderImpl not found
          at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
          at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1212)
          at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1221)
          at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
          at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
          at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
          at javax.json.spi.JsonProvider.provider(JsonProvider.java:68)
          at io.smallrye.health.SmallRyeHealthReporter.<init>(SmallRyeHealthReporter.java:126)
          at io.smallrye.health.SmallRyeHealthReporter_ClientProxy.<init>(Unknown Source)
          at io.smallrye.health.SmallRyeHealthReporter_Bean.proxy(Unknown Source)
          at io.smallrye.health.SmallRyeHealthReporter_Bean.get(Unknown Source)
          at io.smallrye.health.SmallRyeHealthReporter_Bean.get(Unknown Source)
          at io.quarkus.arc.impl.InstanceImpl.getBeanInstance(InstanceImpl.java:229)
          at io.quarkus.arc.impl.InstanceImpl.getInternal(InstanceImpl.java:215)
          at io.quarkus.arc.impl.InstanceImpl.get(InstanceImpl.java:100)
          at io.quarkus.smallrye.health.runtime.SmallRyeHealthRecorder.processSmallRyeHealthRuntimeConfiguration(SmallRyeHealthRecorder.java:47)
          at io.quarkus.deployment.steps.SmallRyeHealthProcessor$processSmallRyeHealthRuntimeConfig1687788508.deploy_0(Unknown Source)
          at io.quarkus.deployment.steps.SmallRyeHealthProcessor$processSmallRyeHealthRuntimeConfig1687788508.deploy(Unknown Source)
          ... 53 more
       

      This bug seems to have been introduced inĀ 
      https://github.com/apache/activemq-artemis/commit/3392d084a904f9517a30242facb0159cf94fbc87

      Attachments

        Issue Links

          Activity

            People

              robbie Robbie Gemmell
              gastaldi George Gastaldi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m