You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2011/04/14 22:28:47 UTC
DO NOT REPLY [Bug 51066] New: Please allow ivy.xml files encoded in
UTF-8 with the BOM without throwing a ParseException
https://issues.apache.org/bugzilla/show_bug.cgi?id=51066
Summary: Please allow ivy.xml files encoded in UTF-8 with the
BOM without throwing a ParseException
Product: Ant
Version: 1.8.2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Optional Tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: ken_c_chu@yahoo.com
If the ivy.xml is encoded in UTF-8 and contains the UTF-8 BOM at the begging of
the file, the parser throws a ParseException. See below for a sample stack
trace. Please allow such ivy.xml files without throwing an exception.
BUILD FAILED
/apps/hudson/slave/workspace/WE-EC-dux-BUILDandDEPLOY-DEV/Tools/build/module.xml:71:
mycompany#compile;working@buildnode11: java.lang.RuntimeException: bad ivy file
in cache for mycompany#compile;working@buildnode11: please clean
'/apps/hudson/slave/workspace/WE-EC-dux-BUILDandDEPLOY-DEV/cloud/ec/ecweb/trunk/duxtemplates/.ivy2.cache/resolved-compile-working@buildnode11.xml'
and resolve again
at
org.apache.ivy.core.deliver.DeliverEngine.deliver(DeliverEngine.java:128)
at org.apache.ivy.Ivy.deliver(Ivy.java:586)
at org.apache.ivy.ant.IvyDeliver.doExecute(IvyDeliver.java:423)
at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.text.ParseException: [[Fatal Error]
resolved-compile-working@buildnode11.xml:1:1: Content is not allowed in prolog.
in
file:/apps/hudson/slave/workspace/WE-EC-dux-BUILDandDEPLOY-DEV/cloud/ec/ecweb/trunk/duxtemplates/.ivy2.cache/resolved-compile-working@buildnode11.xml
]
at
org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
at
org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:272)
at
org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:112)
at
org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
at
org.apache.ivy.core.deliver.DeliverEngine.deliver(DeliverEngine.java:119)
... 32 more
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51066] Please allow ivy.xml files encoded in UTF-8
with the BOM without throwing a ParseException
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51066
Nicolas Lalevée <ni...@hibnet.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Nicolas Lalevée <ni...@hibnet.org> 2011-04-14 16:58:54 EDT ---
Your issue comes from the XML parser you're using. For instance the Crimson
parser is known to not support the BOM whereas the xerces one does.
So look into Ant's classpath for an xml parser to change.
Or look into the one provided by your JRE. In that case just add xerces into
Ant's classpath
And as a side note, bugs report regarding Ivy should better be entered there
https://issues.apache.org/jira/browse/IVY
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51066] Please allow ivy.xml files encoded in UTF-8
with the BOM without throwing a ParseException
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51066
--- Comment #2 from Ken Chu <ke...@yahoo.com> 2011-04-15 01:37:41 EDT ---
Thanks for the pointer to the Ivy bugzilla. I'll change the classpath and give
that a try.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.