The new feature of creating ServerSockets and Sockets by specifying the proxy server does not work with the sun one proxy server. When trying to bind to a local port or during Socket.connect(), a SocketException is thrown. The feature works when tried against a reference socks5 proxy server downloaded from www.socks.nec.com.
STEPS TO REPRODUCE THE PROBLEM:
1. Copy the attached files into the same directory.
2. Compile the java file using source 1.5
3. Setup a sun one proxy server (version 3.6) on a machine. Currently, the server has been setup on xanadu.india.sun.com. Give full permissions to the socks proxy server (see attached socks5.conf file)
4. Edit the proxy.properties and replace xanadu.india.sun.com with the name of the proxy server. Currently the server on xanadu is running but may be brought down in the future.
5. Run the code. The code fails with an exception. The stack trace is present in the attached file output.txt.
Code throws an exception during ServerSocket.bind() and Socket.connect() calls
The client and server communication takes place successfully and the tests pass.