You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2017/11/20 09:08:00 UTC
[jira] [Resolved] (KARAF-5446) Fragment bundles are not resolved
properly when installing/restarting the container
[ https://issues.apache.org/jira/browse/KARAF-5446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved KARAF-5446.
------------------------------------
Resolution: Fixed
> Fragment bundles are not resolved properly when installing/restarting the container
> -----------------------------------------------------------------------------------
>
> Key: KARAF-5446
> URL: https://issues.apache.org/jira/browse/KARAF-5446
> Project: Karaf
> Issue Type: Bug
> Affects Versions: 4.1.2
> Environment: MacOs, downloaded the tar.gz version and started via ./bin/karaf. No custom settings made.
> Reporter: Markus von Rüden
> Assignee: Guillaume Nodet
> Fix For: 4.1.4, 4.2.0
>
>
> h2. Issue description
> When installing a host and a bunch of fragment bundles, the fragments do not get resolved properly. This worked in Karaf 2.4.3 but does not work anymore in 4.1.2. See steps on how to reproduce.
> h2. How to reproduce
> Run *mvn clean install* on a project with the following pom.xml to get the dependencies in your local .m2 repository:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.example.karaf</groupId>
> <artifactId>refresh-issue</artifactId>
> <version>1.0-SNAPSHOT</version>
> <packaging>jar</packaging>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.5.1</version>
> <configuration>
> <source>1.8</source>
> <target>1.8</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <dependencies>
> <dependency>
> <groupId>com.vaadin</groupId>
> <artifactId>vaadin-themes</artifactId>
> <version>7.2.7</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.opennms.features.themes</groupId>
> <artifactId>jmxconfiggenerator-theme</artifactId>
> <version>21.0.0</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.opennms.features.themes</groupId>
> <artifactId>dashboard-theme</artifactId>
> <version>21.0.0</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.opennms.features.themes</groupId>
> <artifactId>onms-default-theme</artifactId>
> <version>21.0.0</version>
> <scope>provided</scope>
> </dependency>
> </dependencies>
> <repositories>
> <repository>
> <snapshots><enabled>false</enabled></snapshots>
> <releases><enabled>true</enabled></releases>
> <id>opennms-repo</id>
> <name>OpenNMS Repository</name>
> <url>http://maven.opennms.org/content/groups/opennms.org-release</url>
> </repository>
> </repositories>
> </project>
> {code}
> Download latest Karaf 4.1.2 version and start it:
> *./bin/karaf*
> Nothing installed:
> {code}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State │ Lvl │ Version │ Name
> ───┼────────┼─────┼─────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> 28 │ Active │ 80 │ 4.1.2 │ Apache Karaf :: OSGi Services :: Event
> karaf@root()>
> {code}
> Install host and fragments:
> {code}
> install -s mvn:com.vaadin/vaadin-themes/7.2.7
> install mvn:org.opennms.features.themes/dashboard-theme/21.0.0
> install mvn:org.opennms.features.themes/jmxconfiggenerator-theme/21.0.0
> install mvn:org.opennms.features.themes/onms-default-theme/21.0.0
> {code}
> The bundles are installed, but not resolved (this is expected behaviour!):
> {code}
> araf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State │ Lvl │ Version │ Name
> ───┼───────────┼─────┼─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> 28 │ Active │ 80 │ 4.1.2 │ Apache Karaf :: OSGi Services :: Event
> 52 │ Active │ 80 │ 7.2.7 │ vaadin-themes
> 53 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Dashboard
> 54 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: JMX Configuration Generator
> 55 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Default
> karaf@root()>
> {code}
> Manually refresh, to resolve. Did not work!
> {code}
> karaf@root()> bundle:refresh
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State │ Lvl │ Version │ Name
> ───┼───────────┼─────┼─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> 28 │ Active │ 80 │ 4.1.2 │ Apache Karaf :: OSGi Services :: Event
> 52 │ Active │ 80 │ 7.2.7 │ vaadin-themes
> 53 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Dashboard
> 54 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: JMX Configuration Generator
> 55 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Default
> {code}
> Stop Container (ctrl+d)
> Restart container: *./bin/karaf*
> Fragments are now resolved:
> {code}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State │ Lvl │ Version │ Name
> ───┼──────────┼─────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> 28 │ Active │ 80 │ 4.1.2 │ Apache Karaf :: OSGi Services :: Event
> 52 │ Active │ 80 │ 7.2.7 │ vaadin-themes, Fragments: 54, 55, 53
> 53 │ Resolved │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Dashboard, Hosts: 52
> 54 │ Resolved │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: JMX Configuration Generator, Hosts: 52
> 55 │ Resolved │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Default, Hosts: 52
> {code}
> Restart container again, Bundles are not resolved
> {code}
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State │ Lvl │ Version │ Name
> ───┼───────────┼─────┼─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> 28 │ Active │ 80 │ 4.1.2 │ Apache Karaf :: OSGi Services :: Event
> 52 │ Active │ 80 │ 7.2.7 │ vaadin-themes
> 53 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Dashboard
> 54 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: JMX Configuration Generator
> 55 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Default
> {code}
> And again, bundle:refresh does not work:
> {code}
> karaf@root()> bundle:refresh
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
> ID │ State │ Lvl │ Version │ Name
> ───┼───────────┼─────┼─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> 28 │ Active │ 80 │ 4.1.2 │ Apache Karaf :: OSGi Services :: Event
> 52 │ Active │ 80 │ 7.2.7 │ vaadin-themes
> 53 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Dashboard
> 54 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: JMX Configuration Generator
> 55 │ Installed │ 80 │ 21.0.0 │ OpenNMS :: Features :: Vaadin :: Theme :: Default
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)