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: | Ant cannot be run when NB path contains space and Latin-1 char | ||
---|---|---|---|
Product: | projects | Reporter: | luisakamotor |
Component: | Ant | Assignee: | Jesse Glick <jglick> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | jglick, mmirilovic, tzezula |
Priority: | P2 | Keywords: | SPACE_IN_PATH |
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://issues.apache.org/bugzilla/show_bug.cgi?id=50543 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
screen error
printscreen_02 printscreen_03 Screen Error on 03/01/2011 debug_01 debug_02 debug_03 Patch |
Description
luisakamotor
2010-11-19 18:42:50 UTC
You said 'after recent update' - does it mean it worked before ? Do you have full stacktrace of the exception you are facing? Without it, I cannot really tell where the problem is. However the problem with wrong character may be related to bug 189988. Created attachment 103337 [details]
screen error
Like I said before: - file reported as missing.... is there: C:\Users\Luís Pedro\.netbeans\6.9\ant\nblib\org-netbeans-modules-mobility-project.jar - netbeans report file location in: C:\Users\Lu�s Pedro\.netbeans\6.9\ant\nblib\org-netbeans-modules-mobility-project.jar (you can see that in new attachment) I don't think that is related with bug 189988. This only happened with my computers where my windows user name account is "Luís Pedro" and only with this file. I think that is related with letter "í". http://en.wikipedia.org/wiki/Acute_accent In my other pcs with windows user name "LPC", i can use files or folders with accents in their name with no problem. This error only happened after update in 6.9.1. Please, I guess that this is any encoding problem recognition from last updates. I can't work in these PCs. Some of my friends are experiencing same problems with windows user names like João" or "António". You need more data to identify the problem? Sorry for my bad english! Thanks! If there is something wrong in the IDE, then it would be bug 189988. If you cannot build a project, that is a different story. Either Ant specific or Java specific. Please can you try the NB 7.0 dev build to see if it's not the problem Jarda has fixed. The build can be downloaded http://bits.netbeans.org/download/trunk/nightly/latest/. If you have still the problem with the dev build can you attach the ant debug output? You can do it by setting Tools/Options/Miscellaneous/Ant/Verbosity Level to debug before the build. It will be also good if you can attach the project metadata (nbproject folder). Which encoding is the OS using? Thanks very much Sorry, moments before I read this mail... I tried with build "netbeans-trunk-nightly-201011250001-ml-windows". I have the results from two computers It works! :) I always used the latest dev version since 5.5. After 6.9.1/7.0 M2 November 11th updates, this error shows up. Latest nightly version, don´t have same error anymore. Now i'm trying with Netbeans 6.9.1 with latest updates(instaled right now in this laptop).... Don't work in 6.9.1. Same error! (printscreen_02) My other PC, with same build(6.9.1) have the same problem. Dev version it's okay. (printscreen_03) Conclusion: Problem solved in latest nightly version. Error still applies to 6.9.1 / 7.0 Beta version. Thanks! Created attachment 103345 [details]
printscreen_02
Created attachment 103346 [details]
printscreen_03
Seems fixed by Jarda as he described above in NB 7.0. If you have some encoding issues in NB 7.0 please reopen this issue or create a new one. It's very hard to detect such problems without localized OS. Thanks very much for your help. Removed '69patch-candidate' ... this was de-facto fixed by fix of issue 189988, so that fix will be a part of the patch. Hi! Again... :S After recent updates, it's impossible to build projects in java in same conditions of previous bug. I have this exception: java.io.FileNotFoundException: C:\Users\Lu�s Pedro\.netbeans\dev\ant\nblib\org-netbeans-modules-java-source-ant.jar (The system cannot find the path specified) Thanks! Created attachment 104664 [details]
Screen Error on 03/01/2011
Sorry, I forget adding the System Info... Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-6313-on-101212) Java: 1.7.0-ea; Java HotSpot(TM) 64-Bit Server VM 20.0-b03 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Userdir: C:\Users\Luís Pedro\.netbeans\dev Please can you attach the output of ant verbose output? It would be good if you can do it both from IDE and command line. For the IDE: In the Tools/Options select Miscellaneous/Ant and change the Verbosity Level from Normal to Debug. Then do the build. In the output window lots of details is printed. Please attach it. For the cmd line: In the project folder type ant -debug jar > debug.txt and attach ten debug.txt One more thing, can you try to turn off the Compile On save and try it again. You can turn off the compile on save in the Project's properties (Compiling/Compile On Save). If you have any question feel free to ask and thanks again for help. Thanks... 1st - Compile On Save - Disabled -> Same error. 2nd - Ant - Verbosity Level - Debug -> Attachment - debug_01.txt 3rd - In CMD - with ANT 1.8.1(ant folder copy/pasted from actual version of Netbeans) -> Attachment - debug_02.txt 4th - In CMD - with ANT 1.8.2(that i have installed on my machine) -> Attachment - debug_03.txt Seems that ANT works fine with original(Netbeans) and latest version, but not Netbeans using original ANT. :S If I do something wrong tell me please. Created attachment 104678 [details]
debug_01
Created attachment 104679 [details]
debug_02
Created attachment 104680 [details]
debug_03
Thanks for the data. It seems as a bug in the org.apache.tools.ant.launch.Locator.decodeUri(String). The problem is in the org.apache.tools.ant.launch.Locator.decodeUri(String) which takes chars and adds them into ByteArrayOutputStream (line 316) causing the upper bits to be thrown away. The method uses the ByteArrayOutputStream because of the decoding of % escape but for non escaped chars > 127 it doesn't work. Created attachment 104717 [details]
Patch
Reassigning to projects/ant to review. Reproducible with NB in "/tmp/açaí berry" on Ubuntu. My initial attempts to reproduce failed because (1) there must be a space character or some other ASCII metachar to produce a %-escape, (2) characters above 255 (e.g. č) do not cause a problem, only U+0080 through U+00FF (I think). Yes, the space is required otherwise the Locator.decodeUri does not do anything. Those characters which have higher byte of char set are truncated in the ByteArrayOutputStream.write. core-main #987a9649ce3c This night, with Ant Update, problem seems resolved. Thanks!!! :) PS: I hate Eclipse... back to Netbeans!!! :) Integrated into 'main-golden', will be available in build *201101060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/987a9649ce3c User: Jesse Glick <jglick@netbeans.org> Log: #192190: Ant cannot be run when NB path contains space and Latin-1 char Thanks for verification! Apparently I neglected to link to the Ant bug that I filed (and fixed for 1.8.3). |