简体   繁体   English

java.net.SocketException:软件导致连接中止:Java 8 recv失败

[英]java.net.SocketException: Software caused connection abort: recv failed with Java 8

I have Client application built on java swing, it throws "java.net.SocketException: Software caused connection abort: recv failed" error when trying to make call to server application. 我有基于Java swing构建的客户端应用程序,尝试调用服务器应用程序时会引发“ java.net.SocketException:软件导致连接中止:recv失败”错误。 When my client application runs on JRE 8 it throws this error, however when it run of Java 7, i do not see this issue. 当我的客户端应用程序在JRE 8上运行时,会引发此错误,但是在Java 7上运行时,我看不到此问题。 error is throw at line. 错误被抛出行。 InputStreamReader is = new InputStreamReader(conn.getInputStream(), "UTF8"); InputStreamReader是= new InputStreamReader(conn.getInputStream(),“ UTF8”);

My server code is running on java 6 on Jboss server. 我的服务器代码在Jboss服务器上的Java 6上运行。

Below is my client code. 以下是我的客户代码。

HttpURLConnection conn = (HttpURLConnection) teamupUrl.openConnection();
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "text/xml; charset=\"utf-8\"");
        conn.setDoOutput(true);
        conn.setDoInput(true);
        conn.connect();
        OutputStreamWriter out = new OutputStreamWriter(conn.getOutputStream(), "UTF8");
        out.write(xmlMsg);
        out.close();        
        // MDH - changed to use a temporary file to hold the transaction response, to avoid
        // out of memory errors with large files
        InputStreamReader is = new InputStreamReader(conn.getInputStream(), "UTF8");// error is throw here.

I checked few answers but could not able to resolve this issue. 我检查了几个答案,但无法解决此问题。

I'm having a similar problem. 我有类似的问题。 My URL is using https with the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword system properties set. 我的URL使用https和javax.net.ssl.trustStore和javax.net.ssl.trustStorePassword系统属性设置。 Is your URL https? 您的网址是https吗? If so maybe it has something to do with the changes in java 8 security. 如果是这样,也许与Java 8安全性的变化有关。 Here's an article about differences between the versions: http://www.oracle.com/technetwork/java/javase/documentation/cve-2014-3566-2342133.html . 以下是有关版本之间差异的文章: http : //www.oracle.com/technetwork/java/javase/documentation/cve-2014-3566-2342133.html Let us know if you figure this out. 让我们知道您是否能解决这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.net.SocketException:软件导致连接中止:recv失败; 原因和治疗方法? - java.net.SocketException: Software caused connection abort: recv failed; Causes and cures? java.net.SocketException:软件导致连接中止:使用其他jre安全性时recv失败 - java.net.SocketException: Software caused connection abort: recv failed when using different jre security BufferedReader.readLine()给出错误java.net.SocketException:软件导致连接中止:recv失败 - BufferedReader.readLine() gives error java.net.SocketException: Software caused connection abort: recv failed JnrpeClient:java.net.SocketException:软件导致连接中止:recv失败 - JnrpeClient : java.net.SocketException: Software caused connection abort: recv failed 在FTP中存储ObjectOutputStream导致java.net.SocketException:软件导致连接中止:套接字写入错误 - Store ObjectOutputStream in FTP causes java.net.SocketException: Software caused connection abort: socket write error java.net.SocketException:软件导致连接中止:重新提交请求时套接字写入错误 - java.net.SocketException: Software caused connection abort: socket write error when resubmitting the request 通过串行端口java.net.SocketException的通信:软件导致连接中止:套接字写入错误 - Communication through serial port, java.net.SocketException: Software caused connection abort: socket write error Java错误 - 软件导致连接中止:recv失败 - Java error - Software caused connection abort: recv failed Java SocketException:软件导致连接中止 - Java SocketException: Software caused connection abort 软件导致连接中止:recv失败 - Software caused connection abort: recv failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM