Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6771432
Votes 0
Synopsis createSocket() - smpatch fails using 1.6.0_10 because of "Unconnected sockets not implemented"
Category java:classes_net
Reported Against b01 , b33
Release Fixed 6u12-rev(b05), 6u14(b02) (Bug ID:2173292)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs 6614957 , 2154579 , 2154580 , 6771237 , 6790841
Submit Date 14-NOV-2008
Description
smpatch checks /usr/jdk for the latest java installation.

When 1.6.0_10 is installed in /usr/jdk , smpatch fails with an error "Unconnected sockets not implemented".

I did some searching and found:
http://www.nabble.com/CXF-and-Java-6-Update-10-td19463818.html

Which is talking about another program that also gets this error when 1.6.0_10 is used. They say:
"I was able to reproduce this.  Fortunately, it's an easy fix (3 lines added to
our SSLSocketFactoryWrapper class).

Basically, older JDK's called the "createSocket" methods that take parameters
and create connected sockets.  The newer JDK seems to call the createSocket()
method (no params) and then connects it later.   However, we were not
forwarding that call into the wrapped socketfactory.   Once I add that, our
https tests pass.

I'm going to run the full test suite and if OK, I'll get it committed and
merged down through so the next releases should be fine. "
-----

... For smpatch, it works fine with java 1.5.0_16, and works with 1.6.0_07
It fails as soon as 1.6.0_10 is installed.

I suspect it's related to the above change to the JVM.

This would mean that older programs that ran fine on 1.6.0_07 and 1.5 may not work on 1.6.0_10 and above - it makes certain programs like smpatch no longer compatible... 

It seems some software out there is dealing with this by changing their source code, but they shouldn't have to if this is indeed a bug in 1.6.0_10.

reference to the smpatch code regarding creating of sockets:

http://opengrok.sfbay/source/xref/SWPatchTools-br_100/src/bundled/app/ppro/sw/classes/com/sun/patchpro/util/CustomSSLSocketFactory.java
http://opengrok.sfbay/source/xref/SWPatchTools-br_100/src/bundled/app/ppro/sw/classes/com/sun/patchpro/security/SSLTunnelSocketFactory.java

From a cursory look, these exist primarily to allow for custom timeouts on the connections we make with them.

What I don't see is any no argument createSocket() constructors in these classes. 
Matthew:  If the no-arg createSocket() is what is being called then wouldn't the superclass implementation in java.net.ssl.SSLSocketFactory be used? Are you suggesting that we override the no argument implementation of SSLSocketFactory in our SocketFactory classes?

Or is it that we should be changing the sequencing somehow in the usage of the the Socket (I assume we need to keep the sequence open a connection and then set the socket factory?)

I'd like to be clear that since the same code is used by clients with earlier JVMs as well as new ones, any solution we put in place needs to work simultaneously on older (Java 5) and new JVMs.

For reference the most obvious clients of these Socket Factories:
http://opengrok.sfbay/source/xref/SWPatchTools-br_100/src/bundled/app/ppro/sw/classes/com/sun/patchpro/util/Downloader.java
http://opengrok.sfbay/source/xref/SWPatchTools-br_100/src/bundled/app/ppro/sw/classes/com/sun/patchpro/server/ServerPatchServiceProvider.java
http://opengrok.sfbay/source/xref/SWPatchTools-br_100/src/bundled/app/ppro/sw/classes/com/sun/patchpro/server/UnifiedServerPatchServiceProvider.java
Posted Date : 2008-11-14 00:26:32.0
Work Around
The custom SocketFactory should override the no-args createSocket() method.

*** (#1 of 1): [ UNSAVED ]   xxxxx@xxxxx  
For anyone who is suffering this problem using smpatch or updatemanager we have a workaround; edit the following lines:

/usr/sbin/pprosvc:JAVACMD="/usr/jdk/latest/bin/java -version:1.5+"
/usr/bin/updatemanager:JAVA_EXEC="/usr/jdk/latest/bin/java -version:1.5+"

And change them to:

/usr/sbin/pprosvc:JAVACMD="/usr/jdk/latest/bin/java -version:1.5*"
/usr/bin/updatemanager:JAVA_EXEC="/usr/jdk/latest/bin/java -version:1.5*"
Evaluation
This is as a reault of the changes for CR 6614957.
Posted Date : 2008-11-17 13:07:02.0

To maintain backward compatibility we plan to fix this bug by failing back to the old way of creating sockets if the supplied factory does not override the default no args createSocket.
Posted Date : 2009-01-07 10:57:43.0
Comments
  
  Include a link with my name & email   

Submitted On 06-APR-2009
test35x
which file shall I edit? Thanks.


Submitted On 12-APR-2009
sblantipodi
This problem is not fixed also in Update 13...
Please tell us what file we should edit.
Thanks!


Submitted On 16-APR-2009
SwitNJ
why this solution did not added to the "ControlPanel" ??!!
and yes, I'm also do not understand what I need to do for shoot this bug! please, tell to us!


Submitted On 16-APR-2009
SwitNJ
java 1.6update13
trying to start 
1) /usr/jdk/latest/bin/java -version:1.5* -jar name.jar
2) /usr/jdk/latest/bin/java -version:1.5+ -jar name.jar
nothing works!
"Unable to locate JRE meeting specification 1.5"



PLEASE NOTE: JDK6 is formerly known as Project Mustang