[
https://issues.apache.org/jira/browse/KARAF-3443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14288895#comment-14288895
]
Patrick Kranz commented on KARAF-3443:
--------------------------------------
I stumbled over the same problem and had a look at the code already. The
problem that I see is, when should the system decide that it waited long enough
for the depending feature. If you copy two files and after the first file is
fully copied the deployer starts and detects that a dependency to the second
file is missing, the second file might not yet be in the deploy folder.
The only solution I see for now is that in case the second file is deployed we
check if we have any features that we tried to deploy that did not work and
then retry but for this I'd like to have some feedback from the maintainers
before starting to work on a patch ;-)
> Deployed KAR files may be installed in the wrong order.
> -------------------------------------------------------
>
> Key: KARAF-3443
> URL: https://issues.apache.org/jira/browse/KARAF-3443
> Project: Karaf
> Issue Type: Bug
> Components: karaf-kar
> Affects Versions: 3.0.2
> Reporter: Karl Leopold
>
> If I start Karaf with two KARs, A and B, in its deploy directory, where A
> contains a feature which depends on B, I'll get an error:
> {code}
> org.apache.karaf.kar.internal.KarServiceImpl: Unable to install Kar feature
> A/1.0
> java.lang.Exception: No feature named 'B' with version '2.0-SNAPSHOT'
> available
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatureDependency(FeaturesServiceImpl.java:581)[18:org.apache.karaf.features.core:3.0.2]
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:522)[18:org.apache.karaf.features.core:3.0.2]
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:395)[18:org.apache.karaf.features.core:3.0.2]
> at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:375)[18:org.apache.karaf.features.core:3.0.2]
> at Proxy1dbf3e21_9a2a_46b9_bf75_2dde3f9950ab.installFeature(Unknown
> Source)[:]
> at Proxy9d8165a0_ff45_4050_90ed_ce57d2e8e46e.installFeature(Unknown
> Source)[:]
> at
> org.apache.karaf.kar.internal.KarServiceImpl.installFeatures(KarServiceImpl.java:215)[31:org.apache.karaf.kar.core:3.0.2]
> at
> org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:96)[31:org.apache.karaf.kar.core:3.0.2]
> at
> org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:84)[31:org.apache.karaf.kar.core:3.0.2]
> at Proxyb6c18187_064e_4455_af37_f30109bbe7bb.install(Unknown Source)[:]
> at Proxybccf42a3_1ef6_4c2a_94f7_8e5308be37f0.install(Unknown Source)[:]
> at
> org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:50)[33:org.apache.karaf.deployer.kar:3.0.2]
> at Proxy01c35796_2258_42cb_8801_281d65d5c3bf.install(Unknown Source)[:]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:931)[41:org.apache.felix.fileinstall:3.4.2]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:865)[41:org.apache.felix.fileinstall:3.4.2]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:482)[41:org.apache.felix.fileinstall:3.4.2]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[41:org.apache.felix.fileinstall:3.4.2]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[41:org.apache.felix.fileinstall:3.4.2]
> {code}
> It works to install both KARs in another order.
> It would be great if a KAR is installed if all dependencies are met, only.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)