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 216452 - java.net.UnknownHostException while running new JavaFx application
Summary: java.net.UnknownHostException while running new JavaFx application
Status: RESOLVED INVALID
Alias: None
Product: javafx
Classification: Unclassified
Component: Deployment (show other bugs)
Version: 7.2
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Petr Somol
URL:
Keywords:
: 217150 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-06 19:04 UTC by neil15
Modified: 2012-08-22 08:36 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description neil15 2012-08-06 19:04:06 UTC
java.net.UnknownHostException while running new JavaFx application in Netbeans 7.2

https://forums.oracle.com/forums/thread.jspa?threadID=2422726&tstart=30

Steps

1.File -> New Project ->JavaFx -> JavaFx Application -> Next -> Finish
2.Run the newly created project.
3.The Sample UI with "Hello World" button comes up but receive the following exception in console

This is not a show stopper but I wonder why this trying to access internet via the auto config url in my internet options's network connections.
The JavaFx program has nothing to do with Internet.

java.net.UnknownHostException: wpad
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
at sun.net.www.http.HttpClient.New(HttpClient.java:290)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:995)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:974)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.getJSFileFromURL(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(Unknown Source)
at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.javafx.main.Main.tryToSetProxy(Main.java:572)
at com.javafx.main.Main.launchApp(Main.java:640)
at com.javafx.main.Main.main(Main.java:805)

Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b08
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 1 Petr Somol 2012-08-07 09:27:38 UTC
We have observed it as well. This is actually not a NetBeans issue, but a JavaFX runtime issue in combination with the proxy setting in your system/browser. It appears first in JavaFX 2.2. The problem is caused by the FX launcher class com.javafx.main.Main that is injected to FX project jar during deployment. The role of the class is to resolve FX artifacts needed for the jar to run; but from 2.2 it also attempts to setup proxy. To quote neigor@netbeans.org whose scope this is:

"We (embedded launcher) are trying to "setup" the proxy for JavaFX application and for this we use your system/browser proxy settings. This is new in 2.2 but this behavior is there since May i think. There is a way to proxy lookup, see troubleshooting chapter in.. " (reference to the upcoming 2.2 documentation page)

From the upcoming 2.2 troubleshooting page I take the following relevant excerpt:

13.3.1 Standalone Execution

* If your application starts slow, then it could be due to network configuration. Try disabling the autoproxy configuration by passing "-Djavafx.autoproxy.disable=true" to see if it helps.

----------
Perhaps on NetBeans side we can surface in UI the javafx.autoproxy.disable switch..
Comment 2 neil15 2012-08-07 18:13:52 UTC
Thank you ! The workaround of passing the VM option as -Djavafx.autoproxy.disable=true worked !

It's up to you if you want to keep this bug open for the future enhancements.
Comment 3 neil15 2012-08-09 17:23:55 UTC
Created JIRA for the same http://javafx-jira.kenai.com/browse/RT-24135
Comment 4 Petr Somol 2012-08-22 08:36:09 UTC
*** Bug 217150 has been marked as a duplicate of this bug. ***