[
https://issues.apache.org/jira/browse/KARAF-4271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré updated KARAF-4271:
----------------------------------------
Fix Version/s: (was: 4.0.7)
4.0.8
> Circular dependency not handled properly when a feature references itself
> directly
> ----------------------------------------------------------------------------------
>
> Key: KARAF-4271
> URL: https://issues.apache.org/jira/browse/KARAF-4271
> Project: Karaf
> Issue Type: Bug
> Components: karaf-feature
> Affects Versions: 4.0.4
> Reporter: Roland Hauser
> Fix For: 4.1.0, 4.0.8
>
>
> I did some experiments with circular dependencies where a feature references
> itself directly. When attribute {{prerequisite}} is set to {{false}} then the
> feature install succeeds with following log-message
> {code}
> 2016-01-14 17:44:25,509 | INFO | e user appsrvadm | FeaturesServiceImpl
> | 7 - org.apache.karaf.features.core - 4.0.4 | Adding features:
> self-circular-dependency/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]
> 2016-01-14 17:44:25,795 | INFO | pool-47-thread-1 | FeaturesServiceImpl
> | 7 - org.apache.karaf.features.core - 4.0.4 | No deployment change.
> 2016-01-14 17:44:25,803 | INFO | pool-47-thread-1 | FeaturesServiceImpl
> | 7 - org.apache.karaf.features.core - 4.0.4 | Done.
> {code}
> When {{prerequisite}} is set to {{true}}, the feature installation fails with
> a StackOverFlowError:
> {code}
> java.lang.StackOverflowError
> at
> org.apache.karaf.features.internal.region.Subsystem.<init>(Subsystem.java:117)
> at
> org.apache.karaf.features.internal.region.SubsystemResolver.prepare(SubsystemResolver.java:103)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:218)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> ...
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:259)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1089)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:985)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]}}
> {code}
> I would expect in both cases, that the feature:install command fails with an
> error message like this: "Feature com.foo.bar could not be installed because
> it references itself"
> You can checkout a project which helps to reproduce the case from
> [https://github.com/SourcePond/reproduce-feature-circular-dependency.git]
> (Maven-Modules self-circular-dependency and
> self-circular-dependency-prerequisite-true). Simply install the root-project
> to have all necessary Maven dependencies.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)