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

resolve failure when run in parallel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.4.0
    • None
    • Ant, Core
    • None

    Description

      resolve fails when using the ant-contrib for task in parallel.
      The line that fails is this:
      <ivy:resolve file="${common.t24ivy.xml}" haltonfailure="${haltonfailure}" revision="1.0.0"/>

      I fixed this locally by making the parseDescriptor method in XmlModuleDescriptorParser synchronized.

      The error output is as below:
      [echo] BUILD FAILED
      [echo] D:\Development\DEV\workspace\UTPDemo\T24BuildDependencies\resources\t24ivy\t24ivy.xml:328: syntax errors in ivy file: java.text.ParseException: exception occurred while parsing file:/D:/Development/DEV/workspace/UTPDemo/T24BuildDependencies/build/t24common-version-all.xml
      [echo] at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.toIvyFile(XmlModuleDescriptorParser.java:167)
      [echo] at org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor.toIvyFile(DefaultModuleDescriptor.java:560)
      [echo] at org.apache.ivy.core.cache.DefaultResolutionCacheManager.saveResolvedModuleDescriptor(DefaultResolutionCacheManager.java:167)
      [echo] at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:243)
      [echo] at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:195)
      [echo] at org.apache.ivy.Ivy.resolve(Ivy.java:507)
      [echo] at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:326)
      [echo] at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
      [echo] Errors:
      [echo] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
      [echo] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      [echo] | Generating : DX_CloseoutAssign at 11/13/2015 11:11:07 AM
      [echo] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [echo] at java.lang.reflect.Method.invoke(Method.java:606)
      [echo] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      [echo] at org.apache.tools.ant.Task.perform(Task.java:348)
      [echo] at org.apache.tools.ant.Target.execute(Target.java:435)
      [echo] at org.apache.tools.ant.Target.performTasks(Target.java:456)
      [echo] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
      [echo] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
      [echo] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      [echo] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
      [echo] at org.apache.tools.ant.Main.runBuild(Main.java:851)
      [echo] at org.apache.tools.ant.Main.startAnt(Main.java:235)
      [echo] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
      [echo] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      [echo] Caused by: org.xml.sax.SAXParseException; systemId: file:/D:/Development/DEV/workspace/UTPDemo/T24BuildDependencies/build/t24common-version-all.xml; lineNumber: 1; columnNumber: 1; Premature end of file.
      [echo] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
      [echo] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
      [echo] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
      [echo] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
      [echo] at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)
      [echo] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1019)
      [echo] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
      [echo] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
      [echo] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
      [echo] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
      [echo] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
      [echo] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      [echo] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
      [echo] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
      [echo] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
      [echo] at org.apache.ivy.util.XMLHelper.parse(XMLHelper.java:146)
      [echo] at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorUpdater.update(XmlModuleDescriptorUpdater.java:1243)
      [echo] at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorUpdater.update(XmlModuleDescriptorUpdater.java:144)
      [echo] at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.toIvyFile(XmlModuleDescriptorParser.java:158)
      [echo] ... 23 more
      [echo]
      [echo] Total time: 2 seconds

      This relates to a similar issue in gradle:

      https://issues.gradle.org/browse/GRADLE-2486

      Attachments

        Activity

          People

            Unassigned Unassigned
            mick-reilly Mick Reilly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: