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] [Commented] (KARAF-5356) feature:install fails if log4j has a fragment attached
Date Fri, 08 Sep 2017 16:48:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-5356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16158904#comment-16158904
] 

Johannes Utzig commented on KARAF-5356:
---------------------------------------

A workaround for the issue seems to be adding the log4j2 bundle into the same feature:

{code:xml}
<feature name="base-startup" version="${project.version}" install="auto" hidden="true"> 
    <bundle start-level="7">mvn:org.example/myfragment/${project.version}</bundle>
    <bundle start-level="8">mvn:org.ops4j.pax.logging/pax-logging-log4j2/1.10.1</bundle>   

</feature>
{code}

> 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
> {code:xml}    <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>{code}
> 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:
> {code}
> 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]
> {code}



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

Mime
View raw message