IvyDE
  1. IvyDE
  2. IVYDE-273

java.lang.StackOverflowError on Ivy>Resolve in Eclipse

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0.beta1
    • Component/s: workspace resolver
    • Labels:
      None
    • Environment:

      Windows 7 Professional, 32 bit
      Eclipse 3.4.2 with Apache Ivy 2.2.0.20100923230623, Apache IvyDE 2.1.0.201008101807-RELEASE

      Description

      An error message is shown: "'Multiply Ivy resolve' has encountered a problem. Some projects fail to be resolved."

      Error Log:
      ...

      eclipse.buildId=unknown
      java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows 7 x86-32 j9vmwi3223-20091104 (JIT enabled)
      J9VM - 20091103_45935_lHdSMr
      JIT - 20091016_1845_r8
      GC - 20091026_AA
      BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
      Framework arguments: -product com.ibm.team.concert.product
      Command-line arguments: -os win32 -ws win32 -arch x86 -product com.ibm.team.concert.product

      Error
      Tue Jan 25 14:01:32 CET 2011
      Unexpected error [java.lang.StackOverflowError]: null

      java.lang.StackOverflowError
      at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2097)
      at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2012)
      at java.util.Calendar.setTimeInMillis(Calendar.java:1098)
      at java.util.GregorianCalendar.<init>(GregorianCalendar.java:592)
      at java.util.Calendar.createCalendar(Calendar.java:999)
      at java.util.Calendar.getInstance(Calendar.java:985)
      at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:528)
      at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:471)
      at sun.net.www.protocol.file.FileURLConnection.initializeHeaders(FileURLConnection.java:128)
      at sun.net.www.protocol.file.FileURLConnection.getContentLength(FileURLConnection.java:151)
      at org.apache.ivy.util.url.BasicURLHandler.getURLInfo(BasicURLHandler.java:77)
      at org.apache.ivy.util.url.BasicURLHandler.getURLInfo(BasicURLHandler.java:54)
      at org.apache.ivy.plugins.repository.url.URLResource.init(URLResource.java:65)
      at org.apache.ivy.plugins.repository.url.URLResource.getLastModified(URLResource.java:59)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder.<init>(PomModuleDescriptorBuilder.java:203)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:114)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)

      ...

      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getCachedModuleDescriptor(IvyClasspathContainerState.java:341)
      at org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver.getDependency(WorkspaceResolver.java:174)
      at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseOtherPom(PomModuleDescriptorParser.java:353)
      at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:139)
      at org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry.parseDescriptor(ModuleDescriptorParserRegistry.java:86)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerState.getModuleDescriptor(IvyClasspathContainerState.java:357)
      at org.apache.ivyde.eclipse.cpcontainer.IvyResolveJob.run(IvyResolveJob.java:73)
      at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer.launchResolve(IvyClasspathContainer.java:161)
      at org.apache.ivyde.eclipse.cpcontainer.IvyMultiResolveJob.run(IvyMultiResolveJob.java:58)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

        Activity

        Hide
        Nicolas Lalevée added a comment -

        Thanks for the info. I have been able to reproduce the bug with a simple pom file with just a parent.

        Show
        Nicolas Lalevée added a comment - Thanks for the info. I have been able to reproduce the bug with a simple pom file with just a parent.
        Hide
        Martin Kalina added a comment -

        Hi Nicolas,

        I'm working with Jan on same project and face same problem. We have no circular dependency. I ran Ivyde with remote debugging, and found that the problem is caused by POM inheritance in combination with Ivyde workspace resolving we use. I attached part of stack trace with my comments. I understand the loop this way:

        Given project A with A.pom, and another project ROOT having ROOT.pom, which is parent of A.pom.
        1) When resolving A, it loads ROOT.pom,
        2) It tries to resolve dependencies of ROOT.pom in workspace
        3) iterating projects, loads any project that has parent pom ROOT.pom, e.g. A
        4) goto 1)

        Show
        Martin Kalina added a comment - Hi Nicolas, I'm working with Jan on same project and face same problem. We have no circular dependency. I ran Ivyde with remote debugging, and found that the problem is caused by POM inheritance in combination with Ivyde workspace resolving we use. I attached part of stack trace with my comments. I understand the loop this way: Given project A with A.pom, and another project ROOT having ROOT.pom, which is parent of A.pom. 1) When resolving A, it loads ROOT.pom, 2) It tries to resolve dependencies of ROOT.pom in workspace 3) iterating projects, loads any project that has parent pom ROOT.pom, e.g. A 4) goto 1)
        Hide
        Nicolas Lalevée added a comment - - edited

        It seems there is a circular dependency in the pom files which IvyDE doesn't handle well.

        Could you attach here the pom.xml file(s) which are part of that circular dependency ?

        Show
        Nicolas Lalevée added a comment - - edited It seems there is a circular dependency in the pom files which IvyDE doesn't handle well. Could you attach here the pom.xml file(s) which are part of that circular dependency ?

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Jan Nad
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development