This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83712 - Project with non-ASCII pathname cannot be built on JDK 6
Summary: Project with non-ASCII pathname cannot be built on JDK 6
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
: 88913 100503 111468 (view as bug list)
Depends on:
Reported: 2006-08-29 16:51 UTC by Jiri Prox
Modified: 2007-07-31 19:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2006-08-29 16:51:33 UTC
NB 5.5 200608260000
JDK 1.6.0 b91
locales ja_JP
pseudolocalized build
tested on Linux FC2 and WinXP

Project containing multibyte character cannot be compiled. The result window
show only message:
/home/jp159440/ã¨ç²®Jotç²®JavaApplication5粤ã/build.xml:7: Cannot find
nbproject/build-impl.xml imported from

Running ant from commandline is ok, and the project get compiled without any errors.

This is somehow connected to JDK version, since with jdk1.60 b81 all works fine.
Comment 1 Tomas Zezula 2006-08-29 18:14:24 UTC
Not in the j2se project. The ant does not find the build-impl.xml at all.
Can you attach ant -debug output? Can you try to build it from command line?
Comment 2 Tomas Zezula 2006-08-29 18:15:01 UTC
It seems either java or ant issue.
Comment 3 Jesse Glick 2006-08-29 20:34:11 UTC
Reproducible for me on Linux FC5 w/ UTF-8 system locale and Czech national chars
in project name/path and main class name using JDK 6 b97 and a plain English dev

Setting ro project property: ant.file.řehoř ->
Project base dir set to: /home/jglick/NetBeansProjects/řehoř
Importing file nbproject/build-impl.xml from
/home/jglick/NetBeansProjects/ÅehoÅ/build.xml:7: Cannot find
nbproject/build-impl.xml imported from
Comment 4 Jesse Glick 2006-08-29 20:52:37 UTC
Does not occur if you configure a separate Ant install dir in Ant Settings. Only
if you are using the default bundled Ant.
Comment 5 Jesse Glick 2006-08-29 20:53:26 UTC
Not reproducible on JDK 5.

Not a project system bug.
Comment 6 Jesse Glick 2006-08-29 21:57:32 UTC
Correction: doesn't matter whether you are using the bundled Ant vs. external.
But if your external Ant includes xercesImpl.jar then the bug will not appear.
The bug *is* specific to Ant 1.6.5 (or earlier); it does not appear with Ant
1.7.0 (currently in beta). From looking through a debugger, it seems the issue
is that

1. Newer implementations of SAX apparently escape non-ASCII characters in
org.xml.sax.Locator.getSystemId(), which I think is correct. This escaping is
done in the usual way: %xx encoding of bytes of the UTF-8 representation.

2. is broken in Ant 1.6.5; it uses
ISO-8859-1 encoding for unescaped URIs, which is wrong.

In fact the bug is reproducible from the command line if you run Ant 1.6.5 with
lib/xercesImpl.jar deleted under JDK 6.

Ant 1.7.0 corrects Locator.decodeUri to use UTF-8 after unescaping:

So suggested release notes entry:

If you are running the IDE on JDK 1.6 (regardless of what Java version you use
to build your projects), and the file path to your project contains national
characters (not in the ASCII character set), you may encounter an error when
building or running your project:

<<some garbage>>/build.xml:7: Cannot find
nbproject/build-impl.xml imported from
<<some garbage>>/build.xml

This is a bug in Ant 1.6.5 triggered by newer XML parsers. If this occurs, you
may use any of the following workarounds:

1. Place your project in a folder which does not use such characters. (Rename
Project in the project's context menu.)

2. Run the IDE under JDK 5.

3. Download Ant 1.7.0. In Tools | Options | Miscellaneous | Ant, switch Ant Home
to be this Ant installation.

4. In Tools | Options | Miscellaneous | Ant, click Manage Classpath. Click Add
JAR/ZIP. Select the file xerces-<<version>>.jar from the directory
ide<<number>>/modules/ext in your NetBeans installation.

Thanks for catching this.
Comment 7 Jesse Glick 2006-11-09 17:12:15 UTC
*** Issue 88913 has been marked as a duplicate of this issue. ***
Comment 8 Jiri Prox 2006-12-01 17:03:27 UTC
Comment 9 Ken Frank 2007-01-04 15:52:51 UTC
I don't see the workaround mentioned below in nb55 rel notes.

What is the best way to get this info to so its seen
by most people ?  I can pursue that.

I did the 2 workarounds about ant using 1.7 or adding xerces to its cp
and it works.

BTW will ant 1.7 be in nb6 ?  I hope so since don't think users
should be required to do these workarounds just because they
want to use national characters.

Comment 10 Jesse Glick 2007-01-05 23:44:32 UTC
I have no control over the contents of the release notes for 5.5 other than
adding the RELNOTE keyword.

NB 6 dev builds already bundle Ant 1.7.0.
Comment 11 Max Sauer 2007-04-18 11:23:09 UTC
*** Issue 100503 has been marked as a duplicate of this issue. ***
Comment 12 Jesse Glick 2007-07-31 19:14:36 UTC
*** Issue 111468 has been marked as a duplicate of this issue. ***