Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-56

latest.integration dependecy may lead to stackoverflowexception

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1
    • 1.2
    • Core
    • None

    Description

      My ivy files were working correctly with ivy 1.0, but as soon as i upgraded to 1.1 i got following exception:

      java.lang.StackOverflowError
      at org.apache.tools.ant.Project.executeTarget(Project.java:1223)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
      at org.apache.tools.ant.Main.runBuild(Main.java:673)
      at org.apache.tools.ant.Main.startAnt(Main.java:188)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
      Caused by: java.lang.StackOverflowError
      at sun.nio.cs.SingleByteEncoder.encodeArrayLoop(SingleByteEncoder.java:95)
      at sun.nio.cs.SingleByteEncoder.encodeLoop(SingleByteEncoder.java:134)
      at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:542)
      at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:384)
      at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136)
      at java.io.OutputStreamWriter.write(OutputStreamWriter.java:191)
      at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
      at java.io.PrintStream.write(PrintStream.java:458)
      at java.io.PrintStream.print(PrintStream.java:602)
      at java.io.PrintStream.println(PrintStream.java:739)
      at org.apache.tools.ant.DefaultLogger.printMessage(DefaultLogger.java:292)
      at org.apache.tools.ant.DefaultLogger.messageLogged(DefaultLogger.java:258)
      at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:1943)
      at org.apache.tools.ant.Project.fireMessageLogged(Project.java:1963)
      at org.apache.tools.ant.Project.log(Project.java:389)
      at fr.jayasoft.ivy.ant.AntMessageImpl.log(AntMessageImpl.java:27)
      at fr.jayasoft.ivy.util.Message.debug(Message.java:57)
      at fr.jayasoft.ivy.resolver.ResolverHelper.listTokenValues(ResolverHelper.java:46)
      at fr.jayasoft.ivy.resolver.ResolverHelper.findAll(ResolverHelper.java:109)
      at fr.jayasoft.ivy.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:69)
      at fr.jayasoft.ivy.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:57)
      at fr.jayasoft.ivy.resolver.AbstractResourceResolver.findResourceUsingPatterns(AbstractResourceResolver.java:72)
      at fr.jayasoft.ivy.resolver.AbstractResourceResolver.findIvyFileRef(AbstractResourceResolver.java:46)
      at fr.jayasoft.ivy.resolver.BasicResolver.getDependency(BasicResolver.java:172)
      at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:435)
      at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:446)
      at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:446)
      at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:446)
      ................................ (lot of times)
      at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:446)
      at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:446)
      at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:446)
      at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:736)
      at fr.jayasoft.ivy.Ivy.doFetchDependencies(Ivy.java:786)
      at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:746)
      at fr.jayasoft.ivy.Ivy.getDependencies(Ivy.java:714)
      at fr.jayasoft.ivy.Ivy.resolve(Ivy.java:585)
      at fr.jayasoft.ivy.ant.IvyResolve.execute(IvyResolve.java:84)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      at org.apache.tools.ant.Task.perform(Task.java:364)
      at org.apache.tools.ant.Target.execute(Target.java:341)
      at org.apache.tools.ant.Target.performTasks(Target.java:369)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
      at org.apache.tools.ant.Main.runBuild(Main.java:673)
      at org.apache.tools.ant.Main.startAnt(Main.java:188)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

      After some root cause analysis, it seems that the problem occurs if a latest.integration dependency is resolved using an artifact pattern that does not contain a revision. I agree that it is a bit strange but it used to work in 1.0.

      At least, the code should not throw a stack overflow but give a more userfriendly message.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            xavier Xavier Hanin
            gui Koen janssens
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment