Hi!!!
I've a problem with an Applet through a proxy. I would be grateful if someone could answer, please!
This applet is a File Uploader applet of the CMS OpenCms. With this applet the user can upload a file or a set of files with a previous preview of file.
When I execute the applet with Internet direct connection I have no problem, but when I need use a proxy for connection it not work!!!
I use SO Windows XP and Java Plug-in version 1.6.0_17 (required for Google Chrome browser) and I test execution over JRE 1.6.0_06 and JRE 1.6.0_17 (configured by Java Control Panel). I test in IE 7, Firefox 3.5 and Chrome 3.0 with the same results.
I enter Proxy information in network configuration of Java control panel. The server is outside my company network.
When I call to JSP that loads the applet, the Java Plug-in use proxy information for download the Applet (jar, properties, etc...) and this process is OK. The Applet download and execute OK, and show a file selector panel for upload files to server. When I click OK, and the Applet start the upload process, it create a ZIP contains the file set to upload and use Jakarta Common HTTPClient for establish HTTP Connections to the server. In this moment, seems that the Java plug-in not bypasses the proxy data correctly to the Applet or the management of Applet connections through a proxy from the plug-in isn't correctly!!!
I have the next messages in a Java console:
...........
basic: Subprograma cargado.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 1094579 us, pluginInit dt 4030742 us, TotalTime: 5125321 us
..........
Nivel de rastreo establecido en 5: todos... terminado.
Reading certificates from 27814 http://cmsproves.upf.edu:80/cmsUPF/resources/components/upload_applet/upload.jar | C:\Documents and Settings\jpenalver\Datos de programa\Sun\Java\Deployment\cache\6.0\55\715f6c77-6fb55222.idx
network: No se ha encontrado entrada de caché [URL: http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/, versión: null]
network: No se ha encontrado entrada de caché [URL: http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class, versión: null]
network: Conectando http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class con proxy=HTTP @ /172.31.22.1:8080
network: Conectar http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class con cookie "JSESSIONID=9F1E62DFFC813FAD9E7AAE71A3D05F16"
network: No se ha encontrado entrada de caché [URL: http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class, versión: null]
network: Conectando http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class con proxy=HTTP @ /172.31.22.1:8080
network: Conectar http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class con cookie "JSESSIONID=9F1E62DFFC813FAD9E7AAE71A3D05F16"
network: No se ha encontrado entrada de caché [URL: http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class, versión: null]
network: Conectando http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class con proxy=HTTP @ /172.31.22.1:8080
network: Conectar http://cmsproves.upf.edu/cmsUPF/opencms/system/workplace/commons/org/apache/log4j/Category.class con cookie "JSESSIONID=9F1E62DFFC813FAD9E7AAE71A3D05F16"
network: Conectando http://cmsproves.upf.edu:80/ con proxy=HTTP @ /172.31.22.1:8080
03-dic-2009 11:45:39 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.SocketException) caught when processing request: Unknown proxy type : HTTP
03-dic-2009 11:45:39 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
network: Conectando http://cmsproves.upf.edu:80/ con proxy=HTTP @ /172.31.22.1:8080
03-dic-2009 11:45:39 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.SocketException) caught when processing request: Unknown proxy type : HTTP
03-dic-2009 11:45:39 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
network: Conectando http://cmsproves.upf.edu:80/ con proxy=HTTP @ /172.31.22.1:8080
03-dic-2009 11:45:39 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.SocketException) caught when processing request: Unknown proxy type : HTTP
03-dic-2009 11:45:39 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
network: Conectando http://cmsproves.upf.edu:80/ con proxy=HTTP @ /172.31.22.1:8080
java.net.SocketException: Unknown proxy type : HTTP
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:139)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:124)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at org.opencms.applet.upload.FileUploadApplet.checkServerOverwrites(FileUploadApplet.java:341)
at org.opencms.applet.upload.UploadAppletFileChooser$1.actionPerformed(UploadAppletFileChooser.java:91)
at javax.swing.JFileChooser.fireActionPerformed(Unknown Source)
at javax.swing.JFileChooser.approveSelection(Unknown Source)
at javax.swing.plaf.basic.BasicFileChooserUI$ApproveSelectionAction.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
......
Is a Java plug-in problem??? Is a bug of this plug-in version??? Anyone had same or similar problems with Applets through proxy???
I modify the Applet code for autodetect proxy settings and set the proxy by http.proxyHost System properties unsuccessfully...