[ 
https://issues.apache.org/jira/browse/KARAF-4271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15621552#comment-15621552
 ] 

ASF subversion and git services commented on KARAF-4271:
--------------------------------------------------------

Commit 7f9ef85bd9067e95e593a4b552d80505daadd740 in karaf's branch 
refs/heads/master from [~gzres]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=7f9ef85 ]

[KARAF-4271][KARAF-4272] Load dependent feature repositories with circular refs 
protection


> 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
>            Assignee: Guillaume Nodet
>             Fix For: 4.1.0
>
>
> 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)

Reply via email to