Question

After updating my Java to the latest version, I have an applet that stops working Here is the error:

Avertissement : un plug-in première génération est utilisé.
Ce plug-in est en phase d'abandon et sera supprimé de la prochaine version 
majeure de Java. Signalez toute difficulté technique que vous rencontrez 
avec le plug-in nouvelle génération sur http://bugs.sun.comPlug-in Java 1.7.0_25
Utilisation de la version JRE 1.7.0_25-b17 Java HotSpot(TM) Client VM
Répertoire d'origine de l'utilisateur = C:\Documents and Settings\jndayra
----------------------------------------------------
c:   effacer la fenêtre de la console
f:   finaliser les objets de la file d'attente de finalisation
g:   nettoyer la mémoire
h:   afficher ce message d'aide
l:   vider la liste des chargeurs de classes
m:   imprimer le relevé d'utilisation de la mémoire
o:   déclencher la journalisation
p:   recharger la configuration du proxy
q:   masquer la console
r:   recharger la configuration des règles
s:   vider les propriétés système et de déploiement
t:   vider la liste des threads
v:   vider la pile des threads
x:   effacer le cache de chargeurs de classes
0-5: fixer le niveau de trace à <n>
----------------------------------------------------

java.net.ConnectException: Connection refused: connect
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
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.plugin.AppletViewer.initEnvironment(Unknown Source)
at sun.plugin.AppletViewer.initEnvironment(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
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 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 sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getContentType(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.isSupportedINSFile(Unknown Source)
... 5 more

Charger : la classe UI.class est introuvable.
java.lang.ClassNotFoundException: UI.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Translated part of error message:

Warning : A first generation plug-in is being used.
This plug-in is being abandoned (depreciated) and will be deleted from the next
    major version of Java.  Report all technical difficulties that you encounter 
    with the new generation plug-in at http://bugs.sun.comPlug-in Java 1.7.0_25
    Using JRE version 1.7.0_25-b17 Java HotSpot(TM) Client VM
    Home directory of the user = C:\Documents and Settings\jndayra
----------------------------------------------------
c:   close the console window
f:   finalize objects on the finalisation queue
g:   clean memory
h:   open this help message
l:   empty the list of class loaders
m:   print the usage record of the memory
o:   activate logging
p:   Reload the proxy configuration
q:   hide the console
r:   relead the rule configurations
s:   empty the system and deployment properties
t:   empty the list of threads
v:   empty the pile of threads
x:   erase the class loader cache
0-5: set the trace level to <n>

and

Load : the class UI.class is unfindable.
java.lang.ClassNotFoundException: UI.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
    //etc

I had this problem earlier, what I did to fix it was to allow all permissions in my java.policy by adding this line.

   grant {
     permission java.security.AllPermission;
   };

This fixed the problem before but it no longer works now .

Was it helpful?

Solution

Everything above this line is irrelevant:

java.net.ConnectException: Connection refused: connect

And this simply means that your applet is experiencing problems at the network level (not Java Security). The host to which it is connecting is refusing the connections, which usually means there is no service listening at that host:port.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top