#705 Request to add additional JAVA_OPTS comment to 'tomcat.conf'
Closed: migrated 3 years ago by dmoluguw. Opened 10 years ago by mharmsen.

Recently, the ability to run the jacoco agent against a running PKI process was requested.

Currently, this should be able to be supported by the following procedure:

* create a '[Tomcat]' section in your instance configuration file for 'pkispawn',
  and set 'pki_enable_java_debugger=True' to override the default value
* run 'pkispawn' to create your instance; with this value enabled, it will stop the
  installation process and allow you to set your desired JAVA_OPTS to 
  JAVA_OPTS="-javaagent:/home/codecoverage/jacoco/lib/jacocoagent.jar=output=
  tcpserver,address=*,port=10000" in the specified file rather than (or in addtion
  to) the debugger version of JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,
  address=8000,server=y,suspend"
* press return to continue the installation

While this was originally intended solely for enabling the JAVA_OPTIONS for a debugger,
it would be convenient to add the jacoco JAVA_OPTIONS as a comment in the
'pki/base/common/shared/conf/tomcat.conf' file.

The comments which talk exclusively about enabling the debugger, could also possibly be
generalized to support more generic enabling of JAVA_OPTIONS in the
'pki/base/server/src/engine/pkiconfig.py' file.


To actually make jacoco reports run successfully on Fedora 20, the following changes were necessary:

  1. Copy all of the jacoco jar files to '/usr/lib/jvm/java/jre/lib/' and change the location of the
    'jacocoagent.jar' file from
    JAVA_OPTS="-javaagent:/home/codecoverage/jacoco/lib/jacocoagent.jar..." to
    JAVA_OPTS="-javaagent:/usr/lib/jvm/java/jre/lib/org.jacoco.agent.rt.jar..."
  2. Within the jacoco 'build.xml' file, make certain that the following line exists:
    <classpath path="/usr/lib/jvm/java/jre/lib/org.jacoco.agent.jar:/usr/lib/jvm/java/jre/lib/org.jacoco.agent.rt.jar:/usr/lib/jvm/java/jre/lib/org.jacoco.ant.jar:/usr/lib/jvm/java/jre/lib/org.jacoco.core.jar:/usr/lib/jvm/java/jre/lib/org.jacoco.report.jar" />
  3. Make certain that the 'objectweb-asm4' package has been installed on the jacoco report system
    since it provides the 'asm.jar' file required to avoid the 'java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor' exception.

Metadata Update from @mharmsen:
- Issue set to the milestone: UNTRIAGED

7 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1274

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata