JDK-6595324 : Three tests in JCK-runtime-6a alt.bundle fail only with agent started in java plugin
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6.0_01
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-08-21
  • Updated: 2012-03-22
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u4Fixed 7 b21Fixed OpenJDK6Fixed
Related Reports
Relates :  
Description
JCK: 6a runtime b14 with alt. bundle b01
JDK: 6u3 b02

Three tests:
api/javax_xml/ws/ee/w2j/rpc/literal/headertest/SoapHeaderFaultTest.html#SoapHeaderFaultTest
api/javax_xml/ws/handler/LogicalHandler/ServerLogicalInboundHandleFaultFalseTest.html#ServerLogicalInboundHandleFaultFalseTest
api/javax_xml/ws/handler/soap/SOAPHandler/ServerSOAPInboundHandleFaultFalseTest.html#ServerSOAPInboundHandleFaultFalseTest

fail in the configuration with active agent started in java plugin only.

Comments
SUGGESTED FIX ------- HttpURLConnection.java ------- 2581a2582 > boolean isChunked = false; 2584a2586 > isChunked = true; 2596c2598 < if (cl < 0) { --- > if (isChunked) { 2623c2625 < } else if (count == expected || (cl < 0 && len <0)) { --- > } else if ((count == expected && !(isChunked)) || (isChunked && len <0)) {
30-08-2007

EVALUATION This bug can be reproduce independently of Java Plugin. This is a bug in the handling of errorStream buffering when the response body is chunked and the its size is greater than the errorStream.bufferSize, default 4K. As we do not know the content length of a chunked response body we simply set the expected amount to the size of the errorStream buffer, default 4K. That way we will read until EOF or errorStream.bufferSize. The problem only arises when the response body is greater than the errorStream.bufferSize. The logic that determines if all the response body has been read incorrectly determines that it has. This is because we have set the expected amount be the same as the errorStream.bufferSize. The only way to determine if a chunked response body has been complete read it to reach EOF.
30-08-2007

EVALUATION This bug appears because web service client cannot read more than 4KB of data through plugin's HttpURLConnection. Please, unzip an attached test, build test code with build.sh and run server with run-server.sh. Test client class client.Client simulates web service client activity. When it is run as a standalone application the output is: ==================================================== -- [ 500 (should be 500) Internal Server Error ] -- HTTP/1.1 500 Internal Server Error Transfer-encoding:chunked Content-type:text/xml; charset=utf-8 <?xml version="1.0" ?><S:Envelope ... Response length: 4140 ====================================================== When run in applet: ====================================================== HTTP/1.1 500 Internal Server Error Transfer-encoding:chunked Content-type:text/xml; charset=utf-8 <?xml version="1.0" ?><S:Envelope ... Response length: 4096 ======================================================= Note the difference in the length of response. Also, note that there is no exception reported to client in this case. Version information: Mozilla version: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.1) Gecko/20070226 Firefox/2.0.0.1 Plugin versions: 1.6.0, 1.6.03-ea
22-08-2007