zSisu
  1. zSisu
  2. SISU-113

Circular dependency in sisu/AOP flavor of guice

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: sisu-2.2.3
    • Fix Version/s: sisu-2.3.0
    • Component/s: Inject
    • Labels:
      None
    • Global Rank:
      11907

      Description

      In sisu-problem-reporting we have a circular dependency between JiraIssueSubmitter -> injected modifiers list (SimilarIssuesModifier) -> IssueSubmitter.

      The problem seems to not appear in UTs of s-p-r but it shows up when used in other projects (like Overlord).
      We solved the problem by disabling the problem modifier for now. (see commit https://github.com/sonatype/sisu-problem-reporting/commit/fc3d833d4a050e46aaaf64a2c0bdd84675c7e106)

      Here is a stack trace from when running Overlord:

      1) Tried proxying java.lang.Object to support a circular dependency, but it is not an interface.
      at file:/Users/adreghiciu/Projects/sonatype/overlord/webapp/target/overlord/WEB-INF/lib/sisu-problem-reporter-1.4-20110801.105908-68.jar!/
      while locating org.codehaus.plexus.swizzle.JiraIssueSubmitter
      while locating java.lang.Object annotated with *
      at org.sonatype.guice.bean.binders.LocatorWiring
      while locating org.codehaus.plexus.swizzle.IssueSubmitter
      for parameter 1 at org.sonatype.sisu.pr.modifier.internal.SimilarIssuesModifier.<init>(SimilarIssuesModifier.java:48)
      while locating org.sonatype.sisu.pr.modifier.internal.SimilarIssuesModifier
      while locating java.lang.Object annotated with *
      at org.codehaus.plexus.swizzle.JiraIssueSubmitter.<init>(JiraIssueSubmitter.java:100)
      at file:/Users/adreghiciu/Projects/sonatype/overlord/webapp/target/overlord/WEB-INF/lib/sisu-problem-reporter-1.4-20110801.105908-68.jar!/
      while locating org.codehaus.plexus.swizzle.JiraIssueSubmitter
      while locating java.lang.Object annotated with *
      at org.sonatype.guice.bean.binders.LocatorWiring
      while locating org.codehaus.plexus.swizzle.IssueSubmitter
      for parameter 0 at com.sonatype.overlord.problemreporting.internal.ProblemReporterServiceImpl.<init>(ProblemReporterServiceImpl.java:40)
      at file:/Users/adreghiciu/Projects/sonatype/overlord/webapp/target/overlord/WEB-INF/lib/core-1.0-SNAPSHOT.jar!/
      while locating com.sonatype.overlord.problemreporting.internal.ProblemReporterServiceImpl
      while locating java.lang.Object annotated with *
      at org.sonatype.guice.bean.binders.LocatorWiring
      while locating com.sonatype.overlord.problemreporting.ProblemReporterService
      for parameter 0 at com.sonatype.overlord.webapp.problemreporting.ReportProblemAction.<init>(ReportProblemAction.java:55)
      at /Users/adreghiciu/Projects/sonatype/overlord/webapp/target/overlord/WEB-INF/classes/
      while locating com.sonatype.overlord.webapp.problemreporting.ReportProblemAction
      for parameter 8 at com.sonatype.overlord.webapp.OverlordWindow.<init>(OverlordWindow.java:111)
      while locating com.sonatype.overlord.webapp.OverlordWindow

        Activity

        Hide
        Stuart McCulloch added a comment -

        I tried changing some of the container dependencies and this exception is fixed by updating sisu-guice to 3.1.0-SNAPSHOT.

        FYI: sisu-guice 3.1.0-SNAPSHOT depends on sisu-guava 0.10.0-SNAPSHOT, which is a snapshot of the (as yet unreleased) Guava trunk. It also introduces a new provision listener which has better semantics for handling custom lifecycles (like Plexus) which sisu-inject-plexus 2.3.0-SNAPSHOT takes advantage of.

        I previously staged some alpha versions of these projects on RSO, but have not released/promoted them. The Guava trunk is stabilizing in preparation for r10, so I should be able to start staging some further updates so people can try them out. Note that Nexus and Overlord both require pom.xml patches to pick up these new dependencies - I'll add them to this issue once I've cleaned them up.

        Show
        Stuart McCulloch added a comment - I tried changing some of the container dependencies and this exception is fixed by updating sisu-guice to 3.1.0-SNAPSHOT. FYI: sisu-guice 3.1.0-SNAPSHOT depends on sisu-guava 0.10.0-SNAPSHOT, which is a snapshot of the (as yet unreleased) Guava trunk. It also introduces a new provision listener which has better semantics for handling custom lifecycles (like Plexus) which sisu-inject-plexus 2.3.0-SNAPSHOT takes advantage of. I previously staged some alpha versions of these projects on RSO, but have not released/promoted them. The Guava trunk is stabilizing in preparation for r10, so I should be able to start staging some further updates so people can try them out. Note that Nexus and Overlord both require pom.xml patches to pick up these new dependencies - I'll add them to this issue once I've cleaned them up.
        Hide
        Stuart McCulloch added a comment -

        FYI, here are the updated forks that use the latest container snapshots:

        https://github.com/mcculls/nexus
        https://github.com/mcculls/overlord

        Show
        Stuart McCulloch added a comment - FYI, here are the updated forks that use the latest container snapshots: https://github.com/mcculls/nexus https://github.com/mcculls/overlord

          People

          • Assignee:
            Stuart McCulloch
            Reporter:
            Alin Dreghiciu
            Last Updated By:
            Stuart McCulloch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: