JDK-7033142 : java.lang.IllegalStateException in network distrubution testing for URLClassLoader.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2011-04-01
  • Updated: 2012-03-22
  • Resolved: 2011-06-10
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 7
7Resolved
Related Reports
Duplicate :  
Relates :  
Description
The test case
api/java_net/distributed/index.html#NetDistributed[distributed2006]
failed on Linux x86 platfrom during JCK-plugin 7 testing with JDK 7 b134. The error message is below:


java.lang.IllegalStateException: zip file closed
        at java.util.zip.ZipFile.ensureOpen(ZipFile.java:595)
        at java.util.zip.ZipFile.getInputStream(ZipFile.java:341)
        at java.util.jar.JarFile.getInputStream(JarFile.java:403)
        at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162)
        at sun.plugin.net.protocol.jar.CachedJarURLConnection.getInputStream(Unknown Source)
        at sun.misc.URLClassPath$Loader$1.getInputStream(URLClassPath.java:553)
        at sun.misc.Resource.cachedInputStream(Resource.java:77)
        at sun.misc.Resource.getByteBuffer(Resource.java:160)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:436)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at javasoft.sqe.tests.api.java.net.distributed.MyURLClassLoader.findClass(NetDistributedTests.java:2202)
        at javasoft.sqe.tests.api.java.net.distributed.NetDistributedTests$6.run(NetDistributedTests.java:886)
        at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithTCKSM(SecurityTestRunner.java:279)
        at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithPermissions(SecurityTestRunner.java:235)
        at javasoft.sqe.jck.lib.SecurityTestRunner.runTestWithAllPermissions(SecurityTestRunner.java:157)
        at javasoft.sqe.jck.lib.AllPermissionSM.testRun(AllPermissionSM.java:86)
        at javasoft.sqe.tests.api.java.net.distributed.NetDistributedTests.distributed2006(NetDistributedTests.java:932)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at javasoft.sqe.javatest.lib.TestCases.invokeTestCases(TestCases.java:173)
        at com.sun.jck.lib.DistributedMultiTest.go(DistributedMultiTest.java:57)
        at javasoft.sqe.tests.api.java.net.distributed.NetDistributedTests.go(NetDistributedTests.java:84)
        at com.sun.jck.lib.DistributedTest.run(DistributedTest.java:71)
        at com.sun.jck.lib.DistributedMultiTest.run(DistributedMultiTest.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at com.sun.jck.lib.ExecJCKTestSameJVMCmd$Version2Test.execute(ExecJCKTestSameJVMCmd.java:488)
        at com.sun.jck.lib.ExecJCKTestSameJVMCmd$StandardTest.run(ExecJCKTestSameJVMCmd.java:436)
        at com.sun.jck.lib.ExecJCKTestSameJVMCmd.execute(ExecJCKTestSameJVMCmd.java:259)
        at com.sun.jck.lib.ExecJCKTestSameJVMCmd.run(ExecJCKTestSameJVMCmd.java:161)
        at com.sun.javatest.agent.Agent$Task.executeCommand(Agent.java:815)
        at com.sun.javatest.agent.Agent$Task.execute(Agent.java:759)
        at com.sun.javatest.agent.Agent$Task.handleRequest(Agent.java:621)
        at com.sun.javatest.agent.Agent.handleRequestsUntilClosed(Agent.java:392)
        at com.sun.javatest.agent.Agent.access$000(Agent.java:60)
        at com.sun.javatest.agent.Agent$1.run(Agent.java:270)
        at java.lang.Thread.run(Thread.java:722)
distributed2006: Failed. Exception from test case: java.lang.IllegalStateException: zip file closed

The issue very similar to the described one in the CR 6635067. But the last was filed against JDK 6. And the issue in this CR looks like regression due to the test passes with JKD 7 b127 and failed with JDK 7 b128.

The issue is reproducible only in Plugin mode.

Comments
EVALUATION I have verified the test passes with the fix from 7050028. Will close as a dup of that bug.
10-06-2011

EVALUATION Looks like same issue as 7050028
10-06-2011

EVALUATION This JCK test failure is due to fix for 6896088 in URLClassPath around lines 534-544. The fix saves the jar file if any and close the input stream. Closing the input stream JarURLConnection.JarURLInputStream also closes JarURLConnection when useCaches value is false. The default useCaches value is true. The plugin code has been set this to false since the bug fix 4371625 around 2004. The JCK test failure caused by Fix 6896088 currently has no impacts on the functionality of the plugin and webstart as they use own PluginURLClassPath implementation. However, other applications that happen to use customed jar protocol handler with their own URLConnection implementation avoid caching would have problem using the plain URLClassLoader. As commented by ###@###.###, see: http://netbeans.org/bugzilla/show_bug.cgi?id=196716#c3 For this reason, I am reclassifying this for proper fix.
10-06-2011