Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 227750 - Illegal character (probably underscore) in hostname
Illegal character (probably underscore) in hostname
Product: platform
Classification: Unclassified
Component: Filesystems
PC Windows 7
: P3 (vote)
Assigned To: Jaroslav Havlin
: 229026 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2013-03-20 23:25 UTC by krauth
Modified: 2016-01-18 14:11 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

Messages log (444.60 KB, application/octet-stream)
2013-03-20 23:25 UTC, krauth

Note You need to log in before you can comment on or make changes to this bug.
Description krauth 2013-03-20 23:25:47 UTC
Created attachment 132880 [details]
Messages log

Opening a project created with a previous version of NetBeans. The project sits in the list of projects, but a right click does not pup up the context menu. So it can't be deleted from the interface.
Comment 1 Milos Kleint 2013-03-21 07:30:26 UTC
reassigning to filesystems. we have a valid FileObject and calling toUrl throws exception that is not mentioned in toUrl javadoc. please evaluate
Comment 2 Jaroslav Tulach 2013-07-09 09:47:05 UTC
The following test seems to pass OK (on Linux with UTF-8 encoding, the reporter uses Cp1252 encoding):

diff -r da0c3769e51d masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/
--- a/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/      Tue Jul 09 06:29:38 2013 +0000
+++ b/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/      Tue Jul 09 11:46:14 2013 +0200
@@ -91,5 +91,9 @@
         assertEquals("", uri.getHost());
         assertEquals("/data/services/web/com_resource/", uri.getPath());
+    public void testUnderscore() throws Exception {
+        URI uri = FileBasedURLMapper.toURI("/db_server/db-scripts/", true, '/');
+        assertNotNull(uri);
+    }
Comment 3 Jaroslav Tulach 2013-07-09 09:51:48 UTC
*** Bug 229026 has been marked as a duplicate of this bug. ***
Comment 4 Jaroslav Havlin 2013-07-10 13:53:16 UTC
(In reply to comment #2)
> The following test seems to pass OK (on Linux with UTF-8 encoding, 
> the reporter uses Cp1252 encoding):
The test passes also on Windows with encoding Cp1252.
Comment 5 Jaroslav Havlin 2013-07-11 12:32:24 UTC
The following test (added to FileBasedURLMapperTest) fails:

public void testUnderscore2() throws Exception {
    URI uri = FileBasedURLMapper.toURI("//db_server/a/", true, '/');

In URI "//db_server/a/", host name is "db_server", which contains an underscore, which is not allowed. (Although some services support it.)

This probably cannot be fixed in NetBeans, because we need to work with URLs of files.
Workaround would be renaming of the host, or creating an alias for it.

Jarda, please, any ideas?
Comment 6 Jaroslav Havlin 2013-07-26 08:09:20 UTC
I've tried replacing "_" with "%5F", just in case it works, but it didn't help.
Comment 7 Jaroslav Havlin 2013-08-19 13:40:36 UTC
I'm sorry, I don't know how to fix this in NetBeans.
Underscore characters are not allowed in host names,
although it's possible to have such hosts in OS Windows.

Please, use IP addresses or create some underscore-free aliases
for the hosts that contain underscores.

Thank you.
Comment 8 sagos1 2016-01-18 14:11:02 UTC
Нужно убрать нижнее подчёркивание( _ ) в пути имени файла -"It is necessary to remove the underscore in the file name path"...

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo