Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
helloworld
Dockerfile
Jenkinsfile
README.md

README.md

Quickstart for Java + Wildfly debugging

A sample application for debugging Java + Wildfly apps using Rookout and Docker.

Before following this guide we recommend reading the basic Java + Rookout guide.

Rookout Integration Explained

There are 3 simple steps to integrate Rookout into your existing Java Wildfly web application:

  1. Add the source files to your built .jar

  2. Add our Wildfly standalone config script available here.

The process is described here : Rookout Integration Process

  1. Set the Rookout Java ETL configuration as environment variables in the Docker container.

Running locally

Requirements: maven, docker

  1. Set your organization token in rookout-conf/standalone.conf on line 39

  2. Build the web application: in the helloworld directory run mvn package

  3. Run docker build --tag wildfly-helloworld . && docker run -it -p 8080:8080 wildfly-helloworld

  4. Open http://localhost:8080/wildfly-helloworld to make sure everything works

  5. Go to http://app.rookout.com and start debugging!

Rookout Integration Process

We have added Rookout to the original project by:

  1. Adding sources to the project jar when building:

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <webResources>
                <resource>
                  <directory>${build.sourceDirectory}</directory>
                  <targetPath>src</targetPath>
                </resource>
              </webResources>
            </configuration>
          </plugin>
        </plugins>
      </build>
  2. Adding Rookout's Wildfly standalone config to add the javaagent to communicate with the app:

    # Fix logger issue and class loading
    JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager,com.rookout"
    JBOSS_LOGMANAGER_VERSION="1.5.2.Final"
    JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-$JBOSS_LOGMANAGER_VERSION.jar"
    # Set the Rookout Java Agent
    JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/jboss/wildfly/lib/rook.jar"

    Known issue: The confirguration overrides the log manager to use jboss.logmanager no matter what. This is because the Rookout Java Agent uses the default java logging and Wildfly is unable to start without its logger.

  3. Set these variables in the standalone.conf at the top of the file like so in order to connect to the right ETL Controller:

    export ROOKOUT_TOKEN="YOUR_TOKEN"
You can’t perform that action at this time.