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

Incorrect configuration definition gives misleading NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3-RC1
    • 1.3-RC3
    • None
    • None
    • all

    Description

      My ivy.xml had a configuration which extended a configuration which did not exist.

      <configurations>
      <conf name="default" description="default minimum dependencies"/>
      <conf name="compile" extends="default"
      description="needed for compilation only"/>
      <conf name="tests" extends="compile, runtime"
      description="classes needed for running tests"/>
      </configurations>

      Notice tests extends runtime.

      When resolving the dependencies, I received a NullPointerException.

      resolve dependencies: null
      at fr.jayasoft.ivy.ant.IvyResolve.execute(IvyResolve.java:139)
      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.executeSortedTargets(Project.java:1216)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      at org.apache.tools.ant.Main.runBuild(Main.java:668)
      at org.apache.tools.ant.Main.startAnt(Main.java:187)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      Caused by: java.lang.NullPointerException
      at fr.jayasoft.ivy.report.XmlReportOutputter.output(XmlReportOutputter.java:68)
      at fr.jayasoft.ivy.report.XmlReportOutputter.output(XmlReportOutputter.java:34)
      at fr.jayasoft.ivy.report.ResolveReport.output(ResolveReport.java:48)
      at fr.jayasoft.ivy.Ivy.resolve(Ivy.java:790)
      at fr.jayasoft.ivy.ant.IvyResolve.execute(IvyResolve.java:100)
      ... 12 more
      — Nested Exception —
      java.lang.NullPointerException
      at fr.jayasoft.ivy.report.XmlReportOutputter.output(XmlReportOutputter.java:68)
      at fr.jayasoft.ivy.report.XmlReportOutputter.output(XmlReportOutputter.java:34)
      at fr.jayasoft.ivy.report.ResolveReport.output(ResolveReport.java:48)
      at fr.jayasoft.ivy.Ivy.resolve(Ivy.java:790)
      at fr.jayasoft.ivy.ant.IvyResolve.execute(IvyResolve.java:100)
      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.executeSortedTargets(Project.java:1216)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      at org.apache.tools.ant.Main.runBuild(Main.java:668)
      at org.apache.tools.ant.Main.startAnt(Main.java:187)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

      Total time: 3 seconds

      After removing this problem with my ivy.xml, the resolve worked properly. Would probably want a more informative error here.

      Thanks.

      -karl

      Attachments

        Activity

          People

            xavier Xavier Hanin
            kbaum Karl Baum
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: