Bug 36513 - Ant not support path including chinese words
Summary: Ant not support path including chinese words
Status: RESOLVED DUPLICATE of bug 37348
Alias: None
Product: Ant
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.6.1
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 1.7.0
Assignee: Ant Notifications List
URL:
Keywords: ErrorMessage
Depends on:
Blocks:
 
Reported: 2005-09-06 10:47 UTC by longjianglei
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description longjianglei 2005-09-06 10:47:07 UTC
I have an ant project:if I run it in a path not including chiness words,it work 
well,but if the path include chinese words,it work wrong and the following is 
the console print:

E:\vss\uep3.01.03a°æ±¾\ums-3.01.03a\ums-svr\docs\dbscript\install-
db\uep\bin>../impl/run-ant.bat -buildfile ../impl/install-db-mssql.xml
JDK: ..\..\..\..\..\..\jdk-windows
Buildfile: ..\impl\install-db-mssql.xml

BUILD FAILED
Error reading project file E:\vss\uep3.01.03a°æ±¾\ums-3.01.03a\ums-
svr\docs\dbscript\install-db\uep\bin\..\impl\install-db-mssql.xml: no 
protocol: ./install-db-common.xml

Total time: 0 seconds
Çë°´ÈÎÒâ¼ü¼ÌÐø . . .
Comment 1 longjianglei 2005-09-21 04:41:37 UTC
My ant project can work well in a path which not include chinese words but fail 
in a path which include chinese words,the error message as follow:

Error reading project file E:\vss\uep3.01.03a”Å–{\ums-3.01.03a\ums-
svr\docs\dbscript\install-db\uep\bin\..\impl\install-db-mysql.xml: no 
protocol: ./install-db-common.xml
Comment 2 Steve Loughran 2006-07-12 21:46:38 UTC
This looks like it is being raised in ProjectHelper.parse
Can you give us a full stack trace so we can get more details on where it happened.

Please can you run ant in a path with chinese words, with the -d option and
paste the output in as a comment.

Comment 3 longjianglei 2006-07-13 01:24:47 UTC
(In reply to comment #2)
> This looks like it is being raised in ProjectHelper.parse
> Can you give us a full stack trace so we can get more details on where it 
happened.
> Please can you run ant in a path with chinese words, with the -d option and
> paste the output in as a comment.

J:\ums\uep3.01.03P005c\ums-svr²âÊÔ\docs\dbscript\install-db\tools\bin>ant -d  -
buildfile ../../uep/impl/install-db-mssql.xml
ANT_HOME=J:\ums\uep3.01.03P005c\ums-svr²âÊÔ\docs\dbscript\install-
db\tools\bin\\..

Warning: JAVA_HOME environment variable is not set.
  If build fails because sun.* classes could not be found
  you will need to set the JAVA_HOME environment variable
  to the installation directory of java.

Apache Ant version 1.6.1 compiled on February 12 2004
Buildfile: ..\..\uep\impl\install-db-mssql.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: F:\jdk\j2sdk1.4.2_01_win\jre
Detected OS: Windows 2000
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.1 compiled 
on February 12 2004
Setting ro project property: ant.file -> J:\ums\uep3.01.03P005c\ums-svr²âÊÔ
\docs\dbscript\install-db\tools\bin\..\..\uep\impl\install-db-mssql.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile J:\ums\uep3.01.03P005c\ums-svr²âÊÔ\docs\dbscript\install-
db\tools\bin\..\..\uep\impl\install-db-mssql.xml with URI = 
file:///J:/ums/uep3.01.03P
Setting ro project property: ant.project.name -> install-db-uep
Adding reference: install-db-uep
Setting ro project property: ant.file.install-db-uep -> 
J:\ums\uep3.01.03P005c\ums-svr²âÊÔ\docs\dbscript\install-
db\tools\bin\..\..\uep\impl\install-db-mssql.xml
Project base dir set to: J:\ums\uep3.01.03P005c\ums-svr²âÊÔ
\docs\dbscript\install-db\uep\impl
 +Target:
resolving systemId: ./install-db-common.xml

BUILD FAILED
Error reading project file J:\ums\uep3.01.03P005c\ums-svr²âÊÔ
\docs\dbscript\install-db\tools\bin\..\..\uep\impl\install-db-mssql.xml: no 
protocol: ./install-db-c
        at org.apache.tools.ant.helper.ProjectHelper2.parse
(ProjectHelper2.java:238)
        at org.apache.tools.ant.helper.ProjectHelper2.parse
(ProjectHelper2.java:133)
        at org.apache.tools.ant.ProjectHelper.configureProject
(ProjectHelper.java:89)
        at org.apache.tools.ant.Main.runBuild(Main.java:617)
        at org.apache.tools.ant.Main.startAnt(Main.java:183)
        at org.apache.tools.ant.Main.start(Main.java:147)
        at org.apache.tools.ant.Main.main(Main.java:230)
Caused by: java.net.MalformedURLException: no protocol: ./install-db-common.xml
        at java.net.URL.<init>(URL.java:537)
        at java.net.URL.<init>(URL.java:434)
        at java.net.URL.<init>(URL.java:383)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown 
Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference
(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.tools.ant.helper.ProjectHelper2.parse
(ProjectHelper2.java:210)
        ... 6 more
--- Nested Exception ---
java.net.MalformedURLException: no protocol: ./install-db-common.xml
        at java.net.URL.<init>(URL.java:537)
        at java.net.URL.<init>(URL.java:434)
        at java.net.URL.<init>(URL.java:383)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown 
Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference
(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.tools.ant.helper.ProjectHelper2.parse
(ProjectHelper2.java:210)
        at org.apache.tools.ant.helper.ProjectHelper2.parse
(ProjectHelper2.java:133)
        at org.apache.tools.ant.ProjectHelper.configureProject
(ProjectHelper.java:89)
        at org.apache.tools.ant.Main.runBuild(Main.java:617)
        at org.apache.tools.ant.Main.startAnt(Main.java:183)
        at org.apache.tools.ant.Main.start(Main.java:147)
        at org.apache.tools.ant.Main.main(Main.java:230)
Comment 4 Antoine Levy-Lambert 2006-07-13 03:39:53 UTC
Hi,
I think that this bug is solved in Ant 1.7
Could you try downloading ant's source and rebuilding ?

I mark it as duplicate of 37348. The bug report 37085 is also a bit similar.
It all boils down to the need to handle specially non ASCII characters to build
URIs.

Antoine

*** This bug has been marked as a duplicate of 37348 ***
Comment 5 longjianglei 2006-07-13 03:57:48 UTC
(In reply to comment #4)
> Hi,
> I think that this bug is solved in Ant 1.7
> Could you try downloading ant's source and rebuilding ?
> I mark it as duplicate of 37348. The bug report 37085 is also a bit similar.
> It all boils down to the need to handle specially non ASCII characters to 
build
> URIs.
> Antoine
> *** This bug has been marked as a duplicate of 37348 ***

Could you tell change which jar to solve it? I don't want change all jars and 
my ant version is ant1.6.1
Comment 6 Antoine Levy-Lambert 2006-07-14 00:34:32 UTC
Hi,

actually, you would have to download ant from source and rebuild it yourself.
The Ant 1.7 version is not yet released.

Regards,

Antoine