在AntJava中,当使用命令提示符运行时,代理在运行时引起问题

j9per5c4  于 2021-06-30  发布在  Java
关注(0)|答案(0)|浏览(345)

我在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&apos;t get initialized; please check the -javaagent JVM initialization parameter was used
    at mockit.internal.startup.Startup.verifyInitialization(Startup.java:60)
    at mockit.MockUp.&lt;clinit&gt;(MockUp.java:53)
</error>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题