-
Notifications
You must be signed in to change notification settings - Fork 262
Java RunTimeException: Failed to create new instance #239
Description
Hello,
I received Java RunTimeException: Failed to create new instance of TPCCBenchmark error when using sample configure file.
$ ./oltpbenchmark -b tpcc -c config/sample_tpcc_config.xml -o output-file -s 5
Error:
Exception in thread "main" java.lang.RuntimeException: Failed to create new instance of TPCCBenchmark
at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:182)
at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:166)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:244)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:180)
... 2 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at com.oltpbenchmark.api.BenchmarkModule.(BenchmarkModule.java:107)
at com.oltpbenchmark.benchmarks.tpcc.TPCCBenchmark.(TPCCBenchmark.java:41)
... 7 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 9 more
I am using Java 9:
~/oltpbench: java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
This seems to be related, but I am not sure.
https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
Any help is greatly appreciated. Thanks!
Thanks,
Zilu