0

我自己构建OpenJDK 9并在我的 Linux 服务器(64 位,64 核,126GB 内存)(Ubuntu 17.10)上运行Dacapo基准测试。

我有InvocationTargetException//当我运行 batik NoClassDefFoundError( ClassNotFoundExceptionDaCapo-9.12-bach benchmark) 和其他一些基准时。

问题:如何解决它以及为什么会出现这些异常?

蜡染

基于 Apache Batik 中的单元测试生成许多可缩放矢量图形 (SVG) 图像

wxf@wxf:/home/wxf/javaPrj/dacapo_benchmark$ /home/wxf/9dev/build/linux-x86_64-normal-server-slowdebug/jdk/bin/java -jar dacapo-9.12-MR1-bach.jar batik
===== DaCapo 9.12-MR1 batik starting =====
About to transcode 3 SVG file(s)

Converting mapWaadt.svg to /home/wxf/javaPrj/dacapo_benchmark/./scratch/mapWaadt.png ... ... success
Converting mapSpain.svg to /home/wxf/javaPrj/dacapo_benchmark/./scratch/mapSpain.png ... ... success
Converting sydney.svg to /home/wxf/javaPrj/dacapo_benchmark/./scratch/sydney.png ... java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.dacapo.harness.Batik.iterate(Batik.java:41)
    at org.dacapo.harness.Benchmark.run(Benchmark.java:187)
    at org.dacapo.harness.TestHarness.runBenchmark(TestHarness.java:199)
    at org.dacapo.harness.TestHarness.main(TestHarness.java:152)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at Harness.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/TruncatedFileException
    at org.apache.batik.ext.awt.image.codec.jpeg.JPEGRegistryEntry.handleStream(JPEGRegistryEntry.java:87)
    at org.apache.batik.ext.awt.image.spi.ImageTagRegistry.readURL(ImageTagRegistry.java:189)
    at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(SVGImageElementBridge.java:257)
    at org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(SVGImageElementBridge.java:176)
    at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(SVGImageElementBridge.java:118)
    at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:206)
    at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:164)
    at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:212)
    at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:164)
    at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:78)
    at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:214)
    at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92)
    at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
    at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:159)
    at org.apache.batik.apps.rasterizer.SVGConverter.transcode(SVGConverter.java:992)
    at org.apache.batik.apps.rasterizer.SVGConverter.execute(SVGConverter.java:715)
    at org.apache.batik.apps.rasterizer.Main.execute(Main.java:938)
    ... 13 more
Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.TruncatedFileException
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
    at org.dacapo.harness.DacapoClassLoader.loadClass(DacapoClassLoader.java:123)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
    ... 30 more

但是,如果我使用 Oracle 的 JDK8,蜡染可以工作。

java版本“1.8.0_144”

Java(TM) SE 运行时环境 (build 1.8.0_144-b01)

Java HotSpot(TM) 64 位服务器 VM(内部版本 25.144-b01,混合模式)

结果:

wxf@wxf:/home/wxf/javaPrj/dacapo_benchmark$ java -jar dacapo-9.12-MR1-bach.jar batik
===== DaCapo 9.12-MR1 batik starting =====
About to transcode 3 SVG file(s)

Converting mapWaadt.svg to /home/wxf/javaPrj/dacapo_benchmark/./scratch/mapWaadt.png ... ... success
Converting mapSpain.svg to /home/wxf/javaPrj/dacapo_benchmark/./scratch/mapSpain.png ... ... success
Converting sydney.svg to /home/wxf/javaPrj/dacapo_benchmark/./scratch/sydney.png ... ... success
===== DaCapo 9.12-MR1 batik PASSED in 3687 msec =====
4

0 回答 0