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 201995 - URISyntaxException: Illegal character in path at index 20: http://wpad/wpad.dat
Summary: URISyntaxException: Illegal character in path at index 20: http://wpad/wpad.dat
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.0.1
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-12 09:28 UTC by Petr Jiricka
Modified: 2011-09-19 11:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception stack trace (4.25 KB, text/plain)
2011-09-12 09:28 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2011-09-12 09:28:53 UTC
Created attachment 110652 [details]
Exception stack trace

Product Version: NetBeans IDE Dev (Build web-main-5765-on-20110912)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383
System: Mac OS X version 10.7.1 running on x86_64; MacRoman; en_US (nb)

When submitting exception report via the automated submitter, I am getting the attached exception. 

java.net.URISyntaxException: Illegal character in path at index 20: http://wpad/wpad.dat
http://wpad/wpad.dat
	at java.net.URI$Parser.fail(URI.java:2809)
        ....
Comment 1 Petr Jiricka 2011-09-12 13:08:29 UTC
This affects all network access from the IDE -> P2. It started to appear after upgrade to Mac OS X Lion; in my network preferences, I have "Auto Proxy Discovery" checked under Proxies.
Comment 2 Petr Jiricka 2011-09-15 14:59:14 UTC
Some diagnostic info - on my machine, the launcher passes:

-Dnetbeans.system_http_proxy=PAC
	http://wpad/wpad.dat
http://wpad/wpad.dat
http://wpad/wpad.dat

i.e. the autoconfig file URL is repeated 3 times.

The information acquired by the launcher from the system is:

<dictionary> {
  ExceptionsList : <array> {
    0 : *.local
    1 : 169.254/16
  }
  FTPPassive : 1
  ProxyAutoConfigEnable : 1
  ProxyAutoConfigURLString : http://wpad/wpad.dat
  ProxyAutoDiscoveryEnable : 1
  __SCOPED__ : <dictionary> {
    en0 : <dictionary> {
      ExceptionsList : <array> {
        0 : *.local
        1 : 169.254/16
      }
      FTPPassive : 1
      ProxyAutoConfigEnable : 1
      ProxyAutoConfigURLString : http://wpad/wpad.dat
      ProxyAutoDiscoveryEnable : 1
    }
    en1 : <dictionary> {
      ExceptionsList : <array> {
        0 : *.local
        1 : 169.254/16
      }
      FTPPassive : 1
      ProxyAutoConfigEnable : 1
      ProxyAutoConfigURLString : http://wpad/wpad.dat
      ProxyAutoDiscoveryEnable : 1
    }
  }
}
Comment 3 Jiri Rechtacek 2011-09-15 15:47:08 UTC
core-main/rev/a6ddf73f666d
Comment 4 Petr Jiricka 2011-09-16 11:55:25 UTC
NB 7.0.1 is also affected by this, changing the version accordingly. The workaround is to change the proxy settings in the NetBeans Preferences to either No Proxy or Manual Proxy Settings. 
Given the severity of this issue (it can be reproduced in many scenarios, such as starting GlassFish), I believe the fix should be released in a patch.

Regarding Jirka's fix, I must say it still does not work for me, now I am getting this exception:
java.lang.AssertionError: Instance of ProxyAutoConfig found for http://wpad/wpad.dat
http://wpad/wpad.dat
	at org.netbeans.core.NbProxySelector.select(NbProxySelector.java:183)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:906)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
	at org.netbeans.modules.uihandler.Installer$Submit.doShow(Installer.java:1523)
	at org.netbeans.modules.uihandler.Installer.displaySummary(Installer.java:957)
	at org.netbeans.modules.uihandler.Installer.displaySummary(Installer.java:966)
	at org.netbeans.modules.uihandler.UIHandler.run(UIHandler.java:160)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1973)
Comment 5 Jiri Rechtacek 2011-09-16 14:22:00 UTC
Oops, the previous fix wasn't enough, core-main/rev/58a1849c0f30 removes all line terminators. Hope it helps.
Comment 6 Quality Engineering 2011-09-17 14:12:58 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a6ddf73f666d
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #201995: URISyntaxException: Illegal character in path at index 20: http://wpad/wpad.dat
Comment 7 Petr Jiricka 2011-09-19 11:52:57 UTC
Works fine with the latest fix.