我在build.xml中添加了以下内容。我用的是java11
<jvmarg value="-Djavaagent:${build.vendor.dir}/sharedArtifacts/sharedCommon/jmockit.jar"/>
在编译时它可以正常工作,但在运行时得到低于错误
<error type="java.lang.ExceptionInInitializerError">java.lang.ExceptionInInitializerError
at ut.com.manu.gensys.processchain.ui.client.AddProcessChainDocTest.framePreProcessFeaturePermissions(AddProcessChainDocTest.java:61)
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)
Caused by: java.lang.IllegalStateException: JMockit didn't get initialized; please check the -javaagent JVM initialization parameter was used
at mockit.internal.startup.Startup.verifyInitialization(Startup.java:60)
at mockit.MockUp.<clinit>(MockUp.java:53)
</error>
暂无答案!
目前还没有任何答案,快来回答吧!