Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6448

pax-loggin-log4j2-extra in pax exam causes IllegalStateException: Resource has no uri

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Information Provided
    • Affects Version/s: 4.2.7
    • Fix Version/s: None
    • Component/s: karaf
    • Labels:
      None
    • Environment:

      Kubuntu 18.04, Karaf 4.2.7, Oracle JDK 1.8.0_201

      Description

      When adding the pax-logging-log4j2-extra/1.11.2 bundle to a pax exam karaf container, an IllegalStateException is thrown with the message "Resource has no uri" and the tests fail.

      To recreate, take the karaf-itst-example project from karaf 4.2.7, and add the bundle in ExampleITest.java:

      mavenBundle("org.ops4j.pax.logging", "pax-logging-log4j2-extra", "1.11.2"),

      And build+run the example.

      The test fails with the exception:

      java.lang.IllegalStateException: Resource has no uri
      at org.apache.karaf.features.internal.service.Deployer.getBundleInputStream(Deployer.java:1630)
      at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:896)
      at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
      at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      org.apache.karaf.features.core [org.apache.karaf.features.internal.service.BootFeaturesInstaller] ERROR : Error installing boot features
      java.lang.IllegalStateException: Resource has no uri
      at org.apache.karaf.features.internal.service.Deployer.getBundleInputStream(Deployer.java:1630)
      at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:896)
      at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
      at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

       

        Attachments

        1. KARAF-6448.patch
          5 kB
          Freeman Yue Fang

          Activity

            People

            • Assignee:
              ffang Freeman Yue Fang
              Reporter:
              amichai Amichai Rothman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: