karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Brasey <nicolas.bra...@gmail.com>
Subject Modularizing our code => How to debug cyclic dependencies on the features
Date Tue, 25 Apr 2017 08:59:31 GMT
Hi guys,

I would need your help regarding the best practices to modularize the code
into "building blocks". I'm working on breaking a monolith into smaller
chunck but I'm faceing some issues having apparently cyclic dependencies in
my different features definitions. The problem is that I can't figure out
where is the cycle. Do you guys have a tool to analyse feature dependencies
? Or how do you manage the feature files when the project becomes of a
bigger size ?


I believe I have a cycle because the maven build hangs when I build the
karaf distribution. A jstack analysis of the build process shows me this
stack trace:


...
...
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
- locked <0x00000005f5a017e8> (a java.util.HashMap)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
at
org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
at
org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1154)
...
...
many more repetitions of the same stack...
...
...


Thanks again for your help!
Nicolas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message