karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Hauser (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-4271) Circular dependency not handled properly when a feature references itself directly
Date Thu, 14 Jan 2016 17:38:39 GMT
Roland Hauser created KARAF-4271:
------------------------------------

             Summary: 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


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

{{
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.
}}

When prerequisite is set to true, the feature installation fails with a StackOverFlowError:

{{
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]
}}
	
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)

Mime
View raw message