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.
Summary: | Project with non-ASCII pathname cannot be built on JDK 6 | ||
---|---|---|---|
Product: | projects | Reporter: | Jiri Prox <jiriprox> |
Component: | Ant | Assignee: | Jesse Glick <jglick> |
Status: | VERIFIED WONTFIX | ||
Severity: | blocker | CC: | kfrank, prehak |
Priority: | P2 | Keywords: | I18N, JDK_SPECIFIC, RELNOTE |
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://wiki.netbeans.org/wiki/view/FaqAntLocale | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jiri Prox
2006-08-29 16:51:33 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? It seems either java or ant issue. 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 build. Setting ro project property: ant.file.řehoř -> /home/jglick/NetBeansProjects/řehoř/build.xml Project base dir set to: /home/jglick/NetBeansProjects/řehoř +Target: Importing file nbproject/build-impl.xml from /home/jglick/NetBeansProjects/ÅehoÅ/build.xml /home/jglick/NetBeansProjects/ÅehoÅ/build.xml:7: Cannot find nbproject/build-impl.xml imported from /home/jglick/NetBeansProjects/ÅehoÅ/build.xml at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:128) [....] Does not occur if you configure a separate Ant install dir in Ant Settings. Only if you are using the default bundled Ant. Not reproducible on JDK 5. Not a project system bug. 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. org.apache.tools.ant.launch.Locator.decodeUri 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: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java?r1=278497&r2=349552 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. *** Issue 88913 has been marked as a duplicate of this issue. *** v. I don't see the workaround mentioned below in nb55 rel notes. What is the best way to get this info to netbeans.org 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. ken.frank@sun,com ken.frank@sun.com 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. *** Issue 100503 has been marked as a duplicate of this issue. *** *** Issue 111468 has been marked as a duplicate of this issue. *** |