Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4857

Workaround for Socket Closed exception with some JDK 1.6.0_nn (>= 38)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.5, 2.7.3
    • 2.7.4, 2.6.7, 3.0.0-milestone1
    • Transports
    • None
    • Unknown

    Description

      With recent Oracle jdk1.6.0_38 (including the latest jdk1.6.0_41) on Windows and Linux, we are observing the Socket Closed exception.

      The exception is shown as
      Caused by: java.net.SocketException: Socket Closed
      at java.net.PlainSocketImpl.getOption(PlainSocketImpl.java:286)
      at java.net.Socket.getSoTimeout(Socket.java:1032)
      at sun.net.www.http.HttpClient.available(HttpClient.java:356)
      at sun.net.www.http.HttpClient.New(HttpClient.java:273)
      at sun.net.www.http.HttpClient.New(HttpClient.java:310)
      at
      sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLCon
      nection.java:987)
      at
      sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnect
      ion.java:923)
      at
      sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.j
      ava:841)
      at
      sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConn
      ection.java:1031)
      at
      org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWra
      ppedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:170)
      at

      So far the issue is only observed with some JDK versions and not with others (e.g. OSX or Win/Linux 1.7.0_nn versions).

      Until this issue is clarified, I am proposing to add a small workaround in CXF to avoid this issue.

      Attachments

        Issue Links

          Activity

            People

              ay Akitoshi Yoshida
              ay Akitoshi Yoshida
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: