[
https://issues.apache.org/jira/browse/KARAF-6448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16946086#comment-16946086
]
Amichai Rothman commented on KARAF-6448:
----------------------------------------
# Must a fragment bundle be installed only before the host bundle? Can't the
resolver deal with it when it encounters it in any order?
# If this is the scenario, perhaps the exception message can be changed to be
more useful, stating something about fragment bundle order rather than a
missing resource uri?
# If I try e.g.
{quote}editConfigurationFilePut("etc/startup.properties",
"mvn:org.ops4j.pax.logging/pax-logging-log4j2-extra/1.11.2", "8"),{quote}
then I get
{quote}SEVERE: Could not launch framework
java.lang.RuntimeException: Error installing bundle listed in
startup.properties with url:
mvn:org.ops4j.pax.logging/pax-logging-log4j2-extra/1.11.2 and startlevel: 8
at org.apache.karaf.main.Main.installAndStartBundles(Main.java:568)
at org.apache.karaf.main.Main.launch(Main.java:274)
at org.apache.karaf.main.Main.main(Main.java:179)
Caused by: java.lang.RuntimeException: Could not resolve
mvn:org.ops4j.pax.logging/pax-logging-log4j2-extra/1.11.2
at
org.apache.karaf.main.util.SimpleMavenResolver.resolve(SimpleMavenResolver.java:59)
at org.apache.karaf.main.Main.installAndStartBundles(Main.java:560)
... 2 more
{quote}
> pax-loggin-log4j2-extra in pax exam causes IllegalStateException: Resource
> has no uri
> -------------------------------------------------------------------------------------
>
> Key: KARAF-6448
> URL: https://issues.apache.org/jira/browse/KARAF-6448
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.7
> Environment: Kubuntu 18.04, Karaf 4.2.7, Oracle JDK 1.8.0_201
> Reporter: Amichai Rothman
> Assignee: Freeman Yue Fang
> Priority: Major
>
> 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:
> {quote}mavenBundle("org.ops4j.pax.logging", "pax-logging-log4j2-extra",
> "1.11.2"),
> {quote}
> And build+run the example.
> The test fails with the exception:
> {quote}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)
> {quote}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)