This discussion is archived
1 Reply Latest reply: May 8, 2012 10:26 AM by 817264 RSS

Java 7 - Applet unable to load resource exception, socket exception

935848 Newbie
Currently Being Moderated
We have a java applet and a desktop application which was running fine on Java 6. After upgrading to java 7 the applet download has stopped working. Here are the errors/exceptions.

Error - Unable to load resource: http://localhost:<port>/applet/xyz.jar.

The jar files are all signed. The desktop application works fine but when started as applet it fails. Everything works fine with Java 1.6 and stopped working on java 7.

The exception thrown is :

com.sun.deploy.net.FailedDownloadException: Unable to load resource:http://localhost:<port>/applet/xyz.jar.
     at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
     at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
     at java.util.concurrent.FutureTask.run(Unknown Source)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)



The wrapped exception is:
java.net.ConnectException: Connection refused: connect
     at java.net.DualStackPlainSocketImpl.connect0(Native Method)
     at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
     at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
     at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
     at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
     at java.net.PlainSocketImpl.connect(Unknown Source)
     at java.net.SocksSocketImpl.connect(Unknown Source)
     at java.net.Socket.connect(Unknown Source)
     at java.net.Socket.connect(Unknown Source)
     at sun.net.NetworkClient.doConnect(Unknown Source)
     at sun.net.www.http.HttpClient.openServer(Unknown Source)
     at sun.net.www.http.HttpClient.openServer(Unknown Source)
     at sun.net.www.http.HttpClient.<init>(Unknown Source)
     at sun.net.www.http.HttpClient.New(Unknown Source)
     at sun.net.www.http.HttpClient.New(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
     at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
     at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
     at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
     at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
     at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
     at java.util.concurrent.FutureTask.run(Unknown Source)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)

Edited by: 932845 on May 8, 2012 9:01 AM

Edited by: 932845 on May 8, 2012 9:02 AM

Edited by: 932845 on May 8, 2012 9:04 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points