Can not attach the jmockit.jar on a springboot application with standalone mode #372

gengcheng opened this Issue Dec 17, 2016 · 0 comments


None yet

1 participant

gengcheng commented Dec 17, 2016 edited

Please provide the following information:

  • Version of JMockit that was used: 1.29

  • Description of the problem or enhancement request:

  1. running jmockit.jar on a springboot process:
    java -jar jmockit-1.29.jar 13113

  2. the jmockit output:
    Exception in thread "main" java.lang.IllegalStateException: Agent JAR not found or no Agent-Class attribute at mockit.internal.startup.AgentLoader.loadAgentAndDetachFromRunningVM( at mockit.internal.startup.AgentLoader.loadAgent( at mockit.coverage.CodeCoverage.main( Caused by: Agent JAR not found or no Agent-Class attribute at at mockit.internal.startup.AgentLoader.loadAgentAndDetachFromRunningVM( ... 2 more

if we starting the springboot application with jmockit.jar as javaagent, like this:
java -jar -javaagent:~/jmockit-1.29.jar=standalone,-Dcoverage-outputDir=~/coverage -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=256m test.jar

the springboot application can be accessed but we can not get the coverage report after killing the application instance on the ~/coverage folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment