Skip to main content
Version: 25.3.0

Red Hat JBoss and WildFly

Please refer to the Proposed Directory Structure section in this document for assistance with the steps below.

Running in Standalone Mode

  1. Go to <absolute-path-to-jboss>/bin.

  2. If using JBoss Application Server 7.x or Enterprise Application Server 6.x or later, open the standalone.conf (Linux) or standalone.conf.bat (Windows) file.

  3. If using JBoss 4.x or 5.x, open the run.conf (Linux) or run.conf.bat (Windows) file.

  4. Search for the following line.

    # Specify options to pass to the Java VM.
  5. Set JAVA_OPTS under that line.

    • On Linux:
    JAVA_OPTS="-javaagent:/opt/waratek/agent/waratek.jar -Dcom.waratek.OceanicProperties=/opt/waratek/<conf_*>/<name of property file> $JAVA_OPTS"
    • On Windows:
    set JAVA_OPTS="-javaagent:<absolute-path-to-agent-home-folder>\agent\waratek.jar -Dcom.waratek.OceanicProperties=<absolute-path-to-agent-home-folder>\<conf_*>\<name of property file> %JAVA_OPTS%"

    Additional JAVA_OPTS are required if using JBoss EAP server version 8+ or WildFly version 15+.

    For JBoss EAP 8+ and WildFly15+, -Dsun.util.logging.disableCallerCheck , -Djava.util.logging.manager , and -Djboss.modules.system.pkgs options must be specified in JAVA_OPTS. In addition, the classpath has to be modified for the Waratek Agent to get attached. -Xbootclasspath/a should be set to include the path to jboss-logmanager-x.x.xx.Final-redhat-xxxxx.jarand to wildfly-common-x.x.x.Final-redhat-xxxxx.jar. For example, for a JBoss EAP 8.0 server on Linux these additional options are;

    -Dsun.util.logging.disableCallerCheck=true /
    -Djava.util.logging.manager=org.jboss.logmanager.LogManager /
    -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager /
    -Xbootclasspath/a:<absolute/path/to/jboss_eap_8_0>/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.19.Final-redhat-00001.jar:<absolute/path/to/jboss_eap_8_0>/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.6.0.Final-redhat-00001.jar

    The logmanager and wildfly-common jarfile names, versions, and paths will vary depending on the JBoss/WildFly installation. Note, on Windows take care to use a semi-colon as the path separator between jarfiles in -Xbootclasspath/a, e.g.

    -Xbootclasspath/a:<D:\path\to\jboss_eap_8_0>\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.19.Final-redhat-00001.jar;<D:\path\to\jboss_eap_8_0>\modules\system\layers\base\org\wildfly\common\main\wildfly-common-1.6.0.Final-redhat-00001.jar
  6. Restart the JBoss / Wildfly server. The server must be restarted for the changes to take effect.