Coverage tool: "standalone" mode works with Tomcat, but not with Glassfish #154

Open
rliesenfeld opened this Issue Mar 16, 2015 · 0 comments

Projects

None yet

1 participant

@rliesenfeld
Member

Running glassfish with "-javaagent:jmockit-coverage.jar" fails with a ClassNotFoundException when the tool attemps to obtain the JMX "MBeanServer"; apparently, glassfish doesn't have the jar for JMX in its base classpath (it is available from a deployed application's classpath, though).

To avoid problems like this, the tool could instead use the Attach API to connect to a running JVM, given its process id. That should give the necessary access to JMX entities. Also, it's probably easier for users to specify a process id than to figure out how to pass the "-javaagent" parameter, which is not exactly easy with servers like glassfish.

@rliesenfeld rliesenfeld self-assigned this Mar 16, 2015
@rliesenfeld rliesenfeld added a commit that referenced this issue Apr 11, 2015
@rliesenfeld rliesenfeld Added ability to load coverage tool into a JVM running in another pro…
…cess, given its process id; partial solution for #154.
0434202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment