java.lang.ExceptionInInitializerError
initializationerror(cn.ljlin233.bean.soundsystem.cdplayertest) time elapsed: 0.005 sec <<< error!
java.lang.exceptionininitializererror
at sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method)
at sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:62)
at sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45)
at java.lang.reflect.constructor.newinstance(constructor.java:423)
at org.junit.internal.builders.annotatedbuilder.buildrunner(annotatedbuilder.java:31)
at org.junit.internal.builders.annotatedbuilder.runnerforclass(annotatedbuilder.java:24)
at org.junit.runners.model.runnerbuilder.saferunnerforclass(runnerbuilder.java:57)
at org.junit.internal.builders.alldefaultpossibilitiesbuilder.runnerforclass(alldefaultpossibilitiesbuilder.java:29)
at org.junit.runners.model.runnerbuilder.saferunnerforclass(runnerbuilder.java:57)
在使用junit和spring时出现,原因时junit版本过低,或者spring版本过高。
将junit版本从4.7改为4.12后解决,spring为4.3.5不变
推荐阅读
-
java.lang.ExceptionInInitializerError
-
java.lang.ExceptionInInitializerError
-
idea 报错 java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags
-
maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags
-
使用jdk11 maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags
-
java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags
-
Maven之java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags异常分析
-
maven编译报错:java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags