karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johannes Utzig (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-5356) feature:install fails if log4j has a fragment attached
Date Fri, 08 Sep 2017 16:41:00 GMT
Johannes Utzig created KARAF-5356:
-------------------------------------

             Summary: feature:install fails if log4j has a fragment attached
                 Key: KARAF-5356
                 URL: https://issues.apache.org/jira/browse/KARAF-5356
             Project: Karaf
          Issue Type: Bug
          Components: karaf-feature
    Affects Versions: 4.1.2
            Reporter: Johannes Utzig


I am facing an issue similar to KARAF-4129
To add a custom appender, I created a fragment for pax-logging-log4j2.
We create a custom distribution with this fragment. To make sure the fragment is attached
to log4j2, I created a feature for it and added it to the startupFeatures

    <feature name="base-startup" version="${project.version}" install="auto" hidden="true">
        <bundle start-level="7">mvn:org.example/myfragment/${project.version}</bundle>

                    <startupFeatures>
                        <feature>base-startup</feature>
                        <feature>framework</feature>
                    </startupFeatures>

When starting this custom distribution, it works fine initially, but when you try to install
a new feature (like webconsole for instance) you end up with:

java.lang.IllegalStateException: Resource has no uri
	at org.apache.karaf.features.internal.service.Deployer.getBundleInputStream(Deployer.java:1460)
[8:org.apache.karaf.features.core:4.1.2]
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:766) [8:org.apache.karaf.features.core:4.1.2]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1233)
[8:org.apache.karaf.features.core:4.1.2]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$0(FeaturesServiceImpl.java:1132)
[8:org.apache.karaf.features.core:4.1.2]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl$$Lambda$15/1744474597.call(Unknown
Source) [8:org.apache.karaf.features.core:4.1.2]




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message