JDK-8150920 : Several SPEC benchmarks with "sun.net.www.protocol.jar.URLJarFile$URLJarFileEntry cannot be cast to java.util.jar.JarFile$JarFileEntry"
  • Type: Bug
  • Component: core-libs
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: x86
  • Submitted: 2016-03-01
  • Updated: 2016-03-03
  • Resolved: 2016-03-03
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 9
9Resolved
Related Reports
Relates :  
Description
SPECjvm2008 derby, mpegaudio, sunflow, xml.transform, and xml.validation fail with

java.lang.ExceptionInInitializerError
        at org.jfree.chart.ChartFactory.createXYLineChart(ChartFactory.java:1469)
        at spec.reporter.BenchmarkChart.<init>(BenchmarkChart.java:47)
        at spec.reporter.ReportGenerator.handleBenchmarkResult(ReportGenerator.java:141)
        at spec.reporter.ReportGenerator.handleBenchmarksResults(ReportGenerator.java:105)
        at spec.reporter.ReportGenerator.<init>(ReportGenerator.java:87)
        at spec.reporter.ReportGenerator.main2(ReportGenerator.java:750)
        at spec.reporter.Reporter.main2(Reporter.java:51)
        at spec.harness.Launch.createReport(Launch.java:307)
        at spec.harness.Launch.runBenchmarkSuite(Launch.java:250)
        at spec.harness.Launch.main(Launch.java:452)
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.jfree.chart.plot.LocalizationBundle, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1560)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
        at org.jfree.chart.plot.XYPlot.<clinit>(XYPlot.java:287)
        ... 10 more
Caused by: java.lang.ClassCastException: sun.net.www.protocol.jar.URLJarFile$URLJarFileEntry cannot be cast to java.util.jar.JarFile$JarFileEntry
        at java.util.jar.JarFile.verifiableEntry(JarFile.java:900)
        at java.util.jar.JarFile.getInputStream(JarFile.java:890)
        at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162)
        at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:242)
	at java.util.ResourceBundle$Control$1.run(ResourceBundle.java:2673)
        at java.util.ResourceBundle$Control$1.run(ResourceBundle.java:2658)
	at java.security.AccessController.doPrivileged(Native Method)
        at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2657)
        at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1499)
        at java.util.ResourceBundle.findBundle(ResourceBundle.java:1465)
        at java.util.ResourceBundle.findBundle(ResourceBundle.java:1419)
        at java.util.ResourceBundle.findBundle(ResourceBundle.java:1419)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1361)
        ... 12 more

Comments
Testsuite: JCK-runtime JDK 9108 Tested OS: Linux x86 Linux x64 OS X 64 While running jdk-9/bin/java -jar JCK-runtime-9/lib/javatest.jar WARNING: missing resource: notification.logname for com.sun.javatest.i18n WARNING: missing resource: logger.logfile.name for com.sun.javatest.logging.i18n WARNING: missing resource: logger.logfile.ext for com.sun.javatest.logging.i18n WARNING: missing resource: cc.verbose.name for com.sun.javatest.tool.i18n WARNING: missing resource: cc.verbose.desc for com.sun.javatest.tool.i18n WARNING: missing resource: verb.max.name for com.sun.javatest.tool.i18n WARNING: missing resource: verb.max.desc for com.sun.javatest.tool.i18n WARNING: missing resource: verb.quiet.name for com.sun.javatest.tool.i18n WARNING: missing resource: verb.quiet.desc for com.sun.javatest.tool.i18n java.lang.ClassCastException: sun.net.www.protocol.jar.URLJarFile$URLJarFileEntry cannot be cast to java.util.jar.JarFile$JarFileEntry at java.util.jar.JarFile.verifiableEntry(JarFile.java:900) at java.util.jar.JarFile.getInputStream(JarFile.java:890) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162) at java.net.URL.openStream(URL.java:1112) at com.sun.javatest.tool.ManagerLoader.loadManagers(ManagerLoader.java:79) at com.sun.javatest.tool.Main.run(Main.java:258) at com.sun.javatest.tool.Main.main0(Main.java:140) at com.sun.javatest.tool.Main.main(Main.java:120) at com.sun.jck.lib.jck4jdk.Main.run(Main.java:619) at com.sun.jck.lib.jck4jdk.Main.main(Main.java:526) java version "9-ea" Java(TM) SE Runtime Environment (build 9-ea+108-2016-03-02-174945.javare.4571) Java HotSpot(TM) 64-Bit Server VM (build 9-ea+108-2016-03-02-174945.javare.4571, mixed mode) WARNING: missing resource: cc.verbose.name for com.sun.javatest.tool.i18n WARNING: missing resource: cc.verbose.desc for com.sun.javatest.tool.i18n WARNING: missing resource: verb.max.name for com.sun.javatest.tool.i18n WARNING: missing resource: verb.max.desc for com.sun.javatest.tool.i18n WARNING: missing resource: verb.quiet.name for com.sun.javatest.tool.i18n WARNING: missing resource: verb.quiet.desc for com.sun.javatest.tool.i18n java.lang.ClassCastException: sun.net.www.protocol.jar.URLJarFile$URLJarFileEntry cannot be cast to java.util.jar.JarFile$JarFileEntry at java.util.jar.JarFile.verifiableEntry(JarFile.java:900) at java.util.jar.JarFile.getInputStream(JarFile.java:890) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162) at java.net.URL.openStream(URL.java:1112) at com.sun.javatest.tool.ManagerLoader.loadManagers(ManagerLoader.java:79) at com.sun.javatest.tool.Main.run(Main.java:258) at com.sun.javatest.tool.Main.main0(Main.java:140) at com.sun.javatest.tool.Main.main(Main.java:120) Adding TCK-red-9.
03-03-2016

Is there a workaround? I'd really like to run the jck tests on my change. This seems somewhat severe. hg backout 13785 works as a workaround.
02-03-2016

Also hitting hs-rt when running JCK tests - see JDK-8151029
02-03-2016

Add mpegaudio, sunflow, xml.transform and xml.validation
01-03-2016

C:\benchmarks>C:\OpenJDK\jdk9_0229\hs-comp\build\windows-x86_64-normal-server-release\jdk\bin\java - jar SPECjvm2008.jar --propfile mcberg.properties derby -ikv -ict SPECjvm2008 Peak Properties file: mcberg.properties Benchmarks: derby WARNING: Run will not be compliant. Property specjvm.run.initial.check must be true for publication. Not a compliant sequence of benchmarks for publication. Property specjvm.run.checksum.validation must be true for publication. Property specjvm.iteration.time must be at least 240 seconds for publication. --- --- --- --- --- --- --- --- --- Benchmark: derby Run mode: timed run Test type: multi Threads: 8 Warmup: 2s Iterations: 1 Run length: 10s Error in setup of Benchmark. spec.harness.StopBenchmarkException: Error invoking bmSetupBenchmarkMethod at spec.harness.ProgramRunner.invokeBmSetupBenchmark(ProgramRunner.java:185) at spec.harness.ProgramRunner.runBenchmark(ProgramRunner.java:301) at spec.harness.ProgramRunner.run(ProgramRunner.java:98) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:520) at spec.harness.ProgramRunner.invokeBmSetupBenchmark(ProgramRunner.java:183) ... 2 more Caused by: java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:288) at spec.benchmarks.derby.DerbyHarness.initDatabases(DerbyHarness.java:232) at spec.benchmarks.derby.Main.setupBenchmark(Main.java:99) ... 7 more Caused by: java.lang.ClassCastException: sun.net.www.protocol.jar.URLJarFile$URLJarFileEntry cannot be cast to java.util.jar.JarFile$JarFileEntry at java.util.jar.JarFile.verifiableEntry(JarFile.java:900) at java.util.jar.JarFile.getInputStream(JarFile.java:890) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162) at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:242) at java.lang.Class.getResourceAsStream(Class.java:2257) at org.apache.derby.impl.services.monitor.FileMonitor.PBinitialize(Unknown Source) at org.apache.derby.impl.services.monitor.FileMonitor.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derby.impl.services.monitor.FileMonitor.initialize(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unknown Source) at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source) at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source) at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source) at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source) ... 11 more
01-03-2016

Steve, as you pushed JDK-8132734, can you please take a look at this issue?
01-03-2016

The problem was reported for hs-comp. I attempted to reproduce the problem with the following snapshots of hs-comp: (1) snapshot after sync hs->hs-comp on 2016-02-29: Issue reproduces; (2) snapshot after pushing JDK-8150738 -> hs-comp on 2016-06-26: The issue does not reproduce. As there is not change that went into hs-comp between (1) and (2), the problem must have been triggered by a changeset that was brought into hs-comp with (1). This seems to be a library-level issue and not a compiler issue. Moreover, JDK-8132734 has recently touched code related to handling jar files and the changes by JDK-8132734 were also brought into hs-comp with (1). So it' can be that that JDK-8132734 causes this problem.
01-03-2016