JBoss 6.x
With the JBoss version 6 and above there is the problem with the logging when an agent that uses the java.util.logging is started with the JBoss. This problem is filled as the bug on the JBoss issue trakcing system. "This is because the java agent does not have access to jboss-logmanager classes, so even if the java.util.logging.manager property is set the classes will not be available." The problem will appear when inspectIT is used as the agent:
DEPLOYMENTS IN ERROR: Deployment "JBossLog4jRepostiorySelector" is in error due to the following reason(s): java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager") Deployment "JBossLogService" is in error due to the following reason(s): java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager"), **ERROR** at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) at java.lang.Thread.run(Thread.java:724)
This page describes how to set up the JBoss 6.x with the inspectIT agent and overcome the problem.
Configuration
The configuration is quite simple. Only needed thing is to edit the run.conf file (if you start with run start script).
At the begging of the file add the following line:
# Added for logging problem JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager"
At the end of the file add the following to solve the logging problem:
# Added for logging problem JBOSS_HOME="[path-to-jboss-folder]" JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:$JBOSS_HOME/lib/jboss-logmanager.jar -Xbootclasspath/p:$JBOSS_HOME/common/lib/jboss-logmanager-log4j.jar -Xbootclasspath/p:$JBOSS_HOME/common/lib/log4j.jar"
Above paths to JAR files relate to JBoss version 6.1.0. If you are using the older version please make sure that the paths to JARs are correct.
At the end of the file we can also integrate the inspectIT related options:
# inspectIT Settings INSPECTIT_AGENT_HOME="[path-to-inspectit-agent-home]" INSPECTIT_CONFIG_HOME="[path-to-config-folder]" INSPECTIT_JAVA_OPTS="-Xbootclasspath/p:${INSPECTIT_AGENT_HOME}/inspectit-agent.jar -javaagent:${INSPECTIT_AGENT_HOME}/inspectit-agent.jar -Dinspectit.config=${INSPECTIT_CONFIG_HOME}" JAVA_OPTS="${INSPECTIT_JAVA_OPTS} ${JAVA_OPTS}"