Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Cycles in Dependency Graph Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cycles in Dependency Graph

    I am trying to use Spring Dynamic Modules for a very simple application, very quickly I ran into eclipse complaining about the existence for cycles in dependency graph for my simple application.

    Eventually I decided to restart development in a fresh workspace.

    I imported the following 4 bundles into my workspace, using File -> Import -> Plug-ins and Fragment from eclipse

    spring beans
    spring context
    spring jdbc
    spring orm

    all version 2.5.4

    Then I selected the manifest for the spring jdbc, in the dependency tab selected "show dependent plug-ins and fragments"

    the hierarchy shows

    spring orm depends on spring jdbc
    spring orm & jdbc depend on spring context ($%#%#%)
    spring context depends on spring orm

    resulting in a loop between context, jdbc, orm

    Nope, I am not crazy, this is definitely what eclipse thinks, checked and double-checked and ...

    Verified that the Import-Packages directive in context has at least 1 reference to orm

    the cycle does not seem to matter much until I try to use both spring jdbc and orm in my application at the same time, it is a no go, as eclipse will not even build.

    What am I doing wrong, or is this a bug (either in spring bundles or equinox/eclipse)

  • #2
    The optional import is required since the spring context jar contains some classes that provide dynamic loading for certain environments. While unfortunate the package dependency should not create problems when running your application under Eclipse Equinox. I haven't used Eclipse PDE that much but I would suggest to use the Spring-DM target platform (kindly supported by Spring-IDE platform site):

    Hope this helps,


    • #3
      By the way, I've just raised an issue to potentially address this in the future:


      • #4
        im facing the same problem

        Almost in every jar about spring (2.5.4) , you can find that it imports what it exports !

        im developing RCP , the cycle stop eclipse from exporting entire app .

        then i export the spring jars manually , it is really...

        will it be fixed ?


        • #5
          Originally posted by lakemove View Post
          will it be fixed ?
          As I see, the issue is currently scheduled for the 2.5.5 release. In any case you may vote for the issue to increase its importance.


          • #6
            Importing exported packages is not a bad practice - quite the contrary.
            See this blog entry from Peter Kriens:
            I haven't used Eclipse RCP but since this scenario is supported, I think there is a problem with the tool itself.
            Consider searching their mailing list or even posting - maybe there is some workaround.


            • #7
              Just to clarify - there is one thing to have cycles between packages (bad) and another to importe what you're exporting (good).


              • #8
                i read the article

                and i agree that it is the RCP tools' problem.

                thank you for pointing out, :P


                • #9
                  though it maybe not belongs to this topic, i will write out my problem and solution for continuous.

                  when i exporting the RCP Product, it told me

                  a cycle was detected when generating spring web

                  i worked on that damn problem for really a long time, finally i found that , in my plugins directory, contains :


                  then i deleted the spring-web.jar, it works

                  since both above jars exports "org.springframework.web" package, it cause confusion when generating classpath(for exporting) . i guess


                  • #10
                    Cycle dependency


                    It still happening with version 3.0.0.M1.
                    Any suggestion of how to fix this issue?



                    • #11
                      Enable "allow for binary cycles in the target platform" - see

                      To quote:
                      Allow binary cycles in target platform is an option that controls how the export operation deals with cycles in the dependency graph for a plug-in. PDE Build cannot compile if a cycle is detected. However, if a cycle only contains binary plug-ins from the target platform, turning on this option will allow PDE Build to continue.