[ 
https://issues.apache.org/jira/browse/IVY-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026175#comment-16026175
 ] 

jaikiran pai edited comment on IVY-1541 at 5/26/17 11:39 AM:
-------------------------------------------------------------

The Ivy documentation[1] has a specific note about concurrency and what's _not_ 
supported by the resolve task:

{quote}
Concurrency
During resolve, Ivy creates a file in the resolution cache. The creation of 
this file is not aimed to support concurrency, meaning that you can't have two 
concurrent resolve of the same module, in the same resolution cache, with the 
same resolveId. 
{quote}

[1] https://ant.apache.org/ivy/history/latest-milestone/use/resolve.html


was (Author: jaikiran):
The Ivy documentation[1] has a specific note about concurrency and what's not 
supported by the resolve task:

{quote}
Concurrency
During resolve, Ivy creates a file in the resolution cache. The creation of 
this file is not aimed to support concurrency, meaning that you can't have two 
concurrent resolve of the same module, in the same resolution cache, with the 
same resolveId. 
{quote}

[1] https://ant.apache.org/ivy/history/latest-milestone/use/resolve.html

> resolve failure when run in parallel
> ------------------------------------
>
>                 Key: IVY-1541
>                 URL: https://issues.apache.org/jira/browse/IVY-1541
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant, Core
>    Affects Versions: 2.4.0
>            Reporter: Mick Reilly
>             Fix For: master
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to