Details
Description
When Karaf is restarted the KarArtifactInstaller does not properly detect that a previously installed KAR is already installed. As a result it always proceeds to reinstall the KAR which causes to uninstall the respective repository including all its features.
The check in KarArtifactInstaller.install(File file) (see master) that does this seems to compare the whole file name (including .kar) with the name of the repository (without .kar).
The existing code is:
// check if the KAR is not already installed
if (karService.list().contains(file.getName())) {
LOGGER.info("KAR {} is already installed. Please uninstall it first.", file.getName());
return;
}
What seems to resolve this issue is to change the code to:
// check if the KAR is not already installed
if (karService.list().contains(getKarName(file))) {
LOGGER.info("KAR {} is already installed. Please uninstall it first.", file.getName());
return;
}
When there is agreement on this fix I can submit a PR for this.
We ran into this issue with openHAB which uses Karaf 4.1.3. The respective code has not changed with 4.2.0.M1.
Attachments
Issue Links
- links to