我々は最近、JRE 1.8にJRE 1.7.0_17/Tomcat7.0.39上で実行されているJAX-WSのWebサービスの技術スタックを更新しました。 0_66/Tomcat 8.0.28。 WebアプリケーションはWindows Server 2012上で動作します.WebサービスはJAX-WSのMetro実装を使用します。クライアントは、JRE 7およびJREに組み込まれたJAX-WSクライアントAPIを使用して、さまざまなWindowsバージョンで実行されます。 Webサービスは、クライアントマシンからWebサービスにファイルをアップロードするために使用され、ドキュメント管理システムに保存されます。実装はJava 7/Tomcat 7の下では完璧に機能しましたが、Java 8/Tomcat 8サーバー側で実行されるより大きいペイロード(2MB以上)で問題が発生しました。クライアントからのスタックトレースは次のとおりです。javax.xml.ws.WebServiceException:にjava.io.IOException:エラーのTomcat 8サーバーへの書き込み
12/02/2015 14:12:38.699 [AWT-EventQueue-0] ERROR DocumentImporterMainWindow$SwingAction.importDocument: Unexpected Problem trying to call the CustomerOrderDMService
javax.xml.ws.WebServiceException: java.io.IOException: Error writing to server
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.readResponseCodeAndMessage(Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.createResponsePacket(Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown Source)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
at com.sun.proxy.$Proxy30.importDocument(Unknown Source)
at com.mycompany.documentimporter.DocumentImporterMainWindow$SwingAction.importDocument(DocumentImporterMainWindow.java:681)
at com.mycompany.documentimporter.DocumentImporterMainWindow$SwingAction.actionPerformed(DocumentImporterMainWindow.java:612)
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.AWTEventMulticaster.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)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: Error writing to server
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 54 more
残念ながら、Tomcatログには何も記録されていません。私は成功しなければ、問題の解決策を模索しています。私は、SOAPリクエスト/応答クライアント側とサーバー側の両方を -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
(クライアント)と -Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true
(サーバー)Javaシステムのプロパティを使用してログするなど、さまざまな方法で問題をデバッグしようとしましたが、ログに記録されている:
---[HTTP request - http://localhost:8080/CustomerOrderDM/services/CustomerOrderDMService]---
Accept: text/xml, multipart/related
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.mycompany.com/CustomerOrderDMService/ImportDocument"
User-Agent: JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns3:ImportDocumentRequestDTO xmlns:ns3="http://www.mycompany.com/CustomerOrderDMService/" xmlns:ns2="http://www.mycompany.com/CustomerOrderDMService"><ns2:QuoteNumber>A000049</ns2:QuoteNumber><ns2:SerialNumber>STOCK</ns2:SerialNumber><ns2:DocumentType>Email</ns2:DocumentType><ns2:Description></ns2:Description><ns2:DocumentContents> **some base64 encoded byte[] of the file contents being uploaded**
Message has been truncated
use com.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold property to increase the amount of printed part of the message
--------------------
のみクライアント側の要求は、我々は、サーバーが完全にリクエストを処理していないと、それは例外ブロックのいくつかの種類に陥るされていますが、サーバーのログファイルへのロギングは何もせずに予想されるログに記録されているので、我々問題を解決するのが難しいです。
私たちは、Monitoringに組み込まれているMonitoringなどのプロキシを試してみましたが、もう一度クライアントからの要求とサーバーからの応答は表示されません(クライアントが失敗した大きな要求を送信すると、クライアントとサーバーの両方で応答)。デバッグのための他の提案は非常に高く評価されるでしょう。
我々はまた、JavaとTomcatのさまざまな組み合わせを試してみました:
- のTomcat 7/Javaの7 =ワークス
- のTomcat 7/Javaの8 =ワークス
- Tomcatの8/Javaの7 =はありませんこれは、問題はTomcaに変更されたTomcatの8のどちらか何かであることを考えるように私たちをリード
動作しない
我々はmaxPostSize="-1"
、connectionTimeout="-1"
、disableUploadTimeout="true"
、connectionUploadTimeout="-1"
、keepAliveTimeout="-1"
のようなTomcatのコネクタ設定の一部を設定しようとしたが、これらのどれも働いていないと正直にサーバ側で何が起こっているかを知らなくても、暗闇の中でショットのように感じます。
Metro jarsサーバー側を最新のリリース(jaxws-ri-2.2.10)に更新すると同時に、Java 8を使用してクライアントを実行しようとしました。どんな助けでも大歓迎です。
あなた自身の答えを答えとして受け入れるべきです。 :) –
maxSwallowSizeとは何ですか? – Nurlan