[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd edited comment on WFLY-895 at 3/4/14 9:21 AM:
----------------------------------------------------------
Facing the similar issue while working with JBoss Profiler ...
Java agent : jboss-profiler-2.0.0.Beta5
OS : windows 7 professional
{noformat}
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: jboss-as-7.1.0.Final
JAVA: jdk1.6.0_31\bin\java
JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx51
2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.se
rver.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.c
onfig=standalone.xml -javaagent:jboss-profiler-2.0.0.Beta5/jboss-profiler.jar
-Djboss-profiler.properties=jboss-profiler-2.0.0.Beta5/jboss-profiler.properties
===============================================================================
starting
JBoss Profiler 2.0.0.Beta5 (Sun Microsystems Inc. 1.6.0_31)
log4j:WARN No appenders could be found for logger (org.jboss.remoting.ServerInvo
ker).
log4j:WARN Please initialize the log4j system properly.
JBoss Profiler: Socket=localhost:5400
WARNING: Failed to load the specified log manager class org.jboss.logmanager.Log
Manager
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
Caused by: java.lang.IllegalStateException: The LogManager was not properly inst
alled (you must set the "java.util.logging.manager" system property to "org.jbos
s.logmanager.LogManager")
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRe
positorySelector.java:42)
... 7 more
{noformat}
was (Author: murthyr):
Facing the similar issue while working with JBoss Profiler ...
Java agent : jboss-profiler-2.0.0.Beta5
OS : windows 7 professional
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: jboss-as-7.1.0.Final
JAVA: jdk1.6.0_31\bin\java
JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx51
2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.se
rver.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.c
onfig=standalone.xml -javaagent:jboss-profiler-2.0.0.Beta5/jboss-profiler.jar
-Djboss-profiler.properties=jboss-profiler-2.0.0.Beta5/jboss-profiler.properties
===============================================================================
starting
JBoss Profiler 2.0.0.Beta5 (Sun Microsystems Inc. 1.6.0_31)
log4j:WARN No appenders could be found for logger (org.jboss.remoting.ServerInvo
ker).
log4j:WARN Please initialize the log4j system properly.
JBoss Profiler: Socket=localhost:5400
WARNING: Failed to load the specified log manager class org.jboss.logmanager.Log
Manager
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
Caused by: java.lang.IllegalStateException: The LogManager was not properly inst
alled (you must set the "java.util.logging.manager" system property to "org.jbos
s.logmanager.LogManager")
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRe
positorySelector.java:42)
... 7 more
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> {noformat}
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd edited comment on WFLY-895 at 3/4/14 9:20 AM:
----------------------------------------------------------
I did everything what you just wrote, but AS 7.1.1 just didnt start and give me the next exception
{noformat}
JBOSS_HOME: C:\jboss\jboss-as-7.1.1.Final
JAVA: C:\Program Files\Java\jdk1.7.0_03\bin\java
JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=
.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl -javaagent:aspectjweaver.jar -Djboss.boot.server.log.d
efault.config=standalone.xml
==============================================================================
ould not load Logmanager "org.jboss.logmanager.LogManager"
ava.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.util.logging.LogManager$1.run(LogManager.java:185)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:175)
at java.util.logging.Logger.getLogger(Logger.java:327)
at org.aspectj.weaver.tools.Jdk14Trace.<init>(Jdk14Trace.java:26)
at org.aspectj.weaver.tools.Jdk14TraceFactory.getTrace(Jdk14TraceFactory.java:17)
at org.aspectj.weaver.loadtime.Aj.<clinit>(Aj.java:46)
at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.<clinit>(ClassPreProcessorAgentAdapter.java:32)
at org.aspectj.weaver.loadtime.Agent.<clinit>(Agent.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
ARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
xception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
aused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" syst
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
... 7 more
ress any key to continue . . .
{noformat}
was (Author: als):
I did everything what you just wrote, but AS 7.1.1 just didnt start and give me the next exception
JBOSS_HOME: C:\jboss\jboss-as-7.1.1.Final
JAVA: C:\Program Files\Java\jdk1.7.0_03\bin\java
JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=
.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl -javaagent:aspectjweaver.jar -Djboss.boot.server.log.d
efault.config=standalone.xml
==============================================================================
ould not load Logmanager "org.jboss.logmanager.LogManager"
ava.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.util.logging.LogManager$1.run(LogManager.java:185)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:175)
at java.util.logging.Logger.getLogger(Logger.java:327)
at org.aspectj.weaver.tools.Jdk14Trace.<init>(Jdk14Trace.java:26)
at org.aspectj.weaver.tools.Jdk14TraceFactory.getTrace(Jdk14TraceFactory.java:17)
at org.aspectj.weaver.loadtime.Aj.<clinit>(Aj.java:46)
at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.<clinit>(ClassPreProcessorAgentAdapter.java:32)
at org.aspectj.weaver.loadtime.Agent.<clinit>(Agent.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
ARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
xception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
aused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" syst
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
... 7 more
ress any key to continue . . .
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> {noformat}
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd edited comment on WFLY-895 at 3/4/14 9:20 AM:
----------------------------------------------------------
Hi,
I have done the same things, mine is a Windows install so I updated the standalone.conf.bat with the details mentioned, but still get error;
JAVA_OPTS is
{noformat}
Calling "D:\jboss-as-7.1.1.Final\bin\standalone.conf.bat"
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: D:\jboss-as-7.1.1.Final
JAVA: C:\Program Files\Java\jdk1.7.0_09\bin\java
JAVA_OPTS: -XX:+TieredCompilation -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.
rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava
.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Djboss.modules.syst
em.pkgs=org.jboss.byteman -Djboss.server.default.config=standalone.xml -Djava.rm
i.server.hostname=10.206.18.194 -Dcom.sun.management.jmxremote.port=8686 -Dcom.s
un.management.jmxremote.password.file="D:\jmxremote\jmxremote.password" -Djava.u
til.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:JBOSS_HOME
/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar
===============================================================================
Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.util.logging.LogManager$1.run(LogManager.java:185)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:175)
at java.util.logging.Logger.getLogger(Logger.java:327)
at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55)
at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstr
ap.java:823)
at sun.management.Agent.startAgent(Agent.java:244)
at sun.management.Agent.startAgent(Agent.java:369)
WARNING: Failed to load the specified log manager class org.jboss.logmanager.Log
Manager
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
Caused by: java.lang.IllegalStateException: The LogManager was not properly inst
alled (you must set the "java.util.logging.manager" system property to "org.jbos
s.logmanager.LogManager")
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRe
positorySelector.java:42)
... 7 more
Press any key to continue . . .
{noformat}
Here is my standalone.conf.bat;
{noformat}
rem ### -*- batch file -*- ######################################################
rem # ##
rem # JBoss Bootstrap Script Configuration ##
rem # ##
rem #############################################################################
rem #
rem #
rem # Added by Derek Nkansah - 7th November 2012
rem # set JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager"
rem #
rem #
rem # $Id: run.conf.bat 88820 2009-05-13 15:25:44Z dimitris(a)jboss.org $
rem #
rem # This batch file is executed by run.bat to initialize the environment
rem # variables that run.bat uses. It is recommended to use this file to
rem # configure these variables, rather than modifying run.bat itself.
rem #
rem # Logging params added 8/11/2012
set JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager"
rem Uncomment the following line to disable manipulation of JAVA_OPTS (JVM parameters)
rem set PRESERVE_JAVA_OPTS=true
if not "x%JAVA_OPTS%" == "x" (
echo "JAVA_OPTS already set in environment; overriding default settings with values: %JAVA_OPTS%"
goto JAVA_OPTS_SET
)
rem #
rem # Specify the JBoss Profiler configuration file to load.
rem #
rem # Default is to not load a JBoss Profiler configuration file.
rem #
rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties"
rem #
rem # Specify the location of the Java home directory (it is recommended that
rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
rem #
set "JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09"
rem #
rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is
rem # not set. Default is "java".
rem #
rem set "JAVA=C:\opt\jdk1.6.0_23\bin\java"
rem #
rem # Specify options to pass to the Java VM. Note, there are some additional
rem # options that are always passed by run.bat.
rem #
rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"
rem # Reduce the RMI GCs to once per hour for Sun JVMs.
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true"
rem # Warn when resolving remote XML DTDs or schemas.
set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true"
rem # Make Byteman classes visible in all module loaders
rem # This is necessary to inject Byteman rules into AS7 deployments
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman"
rem set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.logmanager"
rem # Set the default configuration file to use if -c or --server-config are not used
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.server.default.config=standalone.xml"
rem # Sample JPDA settings for remote socket debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
rem # Sample JPDA settings for shared memory debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
rem # Use JBoss Modules lockless mode
rem set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.lockless=true"
rem # jmxremote operations added by Delboy - 7th November 2012
set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=10.206.18.194 -Dcom.sun.management.jmxremote.port=8686 -Dcom.sun.management.jmxremote.password.file="D:\jmxremote\jmxremote.password""
rem # Logging - Added 8/11/2012
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
:JAVA_OPTS_SET
set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:%JBOSS_HOME/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar"
Here is a copy of my standalone.bat;
@echo off
rem -------------------------------------------------------------------------
rem JBoss Bootstrap Script for Windows
rem -------------------------------------------------------------------------
echo JAVA_OPTS is %JAVA_OPT%
rem $Id$
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
if "%OS%" == "Windows_NT" (
set "DIRNAME=%~dp0%"
) else (
set DIRNAME=.\
)
rem Read an optional configuration file.
if "x%STANDALONE_CONF%" == "x" (
set "STANDALONE_CONF=%DIRNAME%standalone.conf.bat"
)
if exist "%STANDALONE_CONF%" (
echo Calling "%STANDALONE_CONF%"
call "%STANDALONE_CONF%" %*
) else (
echo Config file not found "%STANDALONE_CONF%"
)
pushd %DIRNAME%..
set "RESOLVED_JBOSS_HOME=%CD%"
popd
if "x%JBOSS_HOME%" == "x" (
set "JBOSS_HOME=%RESOLVED_JBOSS_HOME%"
)
pushd "%JBOSS_HOME%"
set "SANITIZED_JBOSS_HOME=%CD%"
popd
if "%RESOLVED_JBOSS_HOME%" NEQ "%SANITIZED_JBOSS_HOME%" (
echo WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
)
set DIRNAME=
if "%OS%" == "Windows_NT" (
set "PROGNAME=%~nx0%"
) else (
set "PROGNAME=standalone.bat"
)
rem Added by Derek Nkansah as per recommendations from SolarWinds
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
rem Setup JBoss specific properties
rem set JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%
rem set JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.acl=false
if "x%JAVA_HOME%" == "x" (
set JAVA=java
echo JAVA_HOME is not set. Unexpected results may occur.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
) else (
set "JAVA=%JAVA_HOME%\bin\java"
)
if not "%PRESERVE_JAVA_OPTS%" == "true" (
rem Add -client to the JVM options, if supported (32 bit VM), and not overriden
echo "%JAVA_OPTS%" | findstr /I \-server > nul
if errorlevel == 1 (
"%JAVA%" -client -version 2>&1 | findstr /I /C:"Client VM" > nul
if not errorlevel == 1 (
set "JAVA_OPTS=-client %JAVA_OPTS%"
)
)
rem Add compressed oops, if supported (64 bit VM), and not overriden
echo "%JAVA_OPTS%" | findstr /I "\-XX:\-UseCompressedOops \-client" > nul
if errorlevel == 1 (
"%JAVA%" -XX:+UseCompressedOops -version > nul 2>&1
if not errorlevel == 1 (
set "JAVA_OPTS=-XX:+UseCompressedOops %JAVA_OPTS%"
)
)
rem Add tiered compilation, if supported (64 bit VM), and not overriden
echo "%JAVA_OPTS%" | findstr /I "\-XX:\-TieredCompilation \-client" > nul
if errorlevel == 1 (
"%JAVA%" -XX:+TieredCompilation -version > nul 2>&1
if not errorlevel == 1 (
set "JAVA_OPTS=-XX:+TieredCompilation %JAVA_OPTS%"
)
)
)
rem Find jboss-modules.jar, or we can't continue
if exist "%JBOSS_HOME%\jboss-modules.jar" (
set "RUNJAR=%JBOSS_HOME%\jboss-modules.jar"
) else (
echo Could not locate "%JBOSS_HOME%\jboss-modules.jar".
echo Please check that you are in the bin directory when running this script.
goto END
)
rem Setup JBoss specific properties
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Set default module root paths
if "x%JBOSS_MODULEPATH%" == "x" (
set "JBOSS_MODULEPATH=%JBOSS_HOME%\modules"
)
rem Set the standalone base dir
if "x%JBOSS_BASE_DIR%" == "x" (
set "JBOSS_BASE_DIR=%JBOSS_HOME%\standalone"
)
rem Set the standalone log dir
if "x%JBOSS_LOG_DIR%" == "x" (
set "JBOSS_LOG_DIR=%JBOSS_BASE_DIR%\log"
)
rem Set the standalone configuration dir
if "x%JBOSS_CONFIG_DIR%" == "x" (
set "JBOSS_CONFIG_DIR=%JBOSS_BASE_DIR%/configuration"
)
echo ===============================================================================
echo.
echo JBoss Bootstrap Environment
echo.
echo JBOSS_HOME: %JBOSS_HOME%
echo.
echo JAVA: %JAVA%
echo.
echo JAVA_OPTS: %JAVA_OPTS%
echo.
echo ===============================================================================
echo.
:RESTART
"%JAVA%" %JAVA_OPTS% ^
"-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\boot.log" ^
"-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^
-jar "%JBOSS_HOME%\jboss-modules.jar" ^
-mp "%JBOSS_MODULEPATH%" ^
-jaxpmodule "javax.xml.jaxp-provider" ^
org.jboss.as.standalone ^
-Djboss.home.dir="%JBOSS_HOME%" ^
-Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
%*
if ERRORLEVEL 10 goto RESTART
:END
if "x%NOPAUSE%" == "x" pause
:END_NO_PAUSE
{noformat}
Can you help?
Many thanks,
Derek
was (Author: knkansah):
Hi,
I have done the same things, mine is a Windows install so I updated the standalone.conf.bat with the details mentioned, but still get error;
JAVA_OPTS is
Calling "D:\jboss-as-7.1.1.Final\bin\standalone.conf.bat"
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: D:\jboss-as-7.1.1.Final
JAVA: C:\Program Files\Java\jdk1.7.0_09\bin\java
JAVA_OPTS: -XX:+TieredCompilation -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.
rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava
.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Djboss.modules.syst
em.pkgs=org.jboss.byteman -Djboss.server.default.config=standalone.xml -Djava.rm
i.server.hostname=10.206.18.194 -Dcom.sun.management.jmxremote.port=8686 -Dcom.s
un.management.jmxremote.password.file="D:\jmxremote\jmxremote.password" -Djava.u
til.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:JBOSS_HOME
/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar
===============================================================================
Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.util.logging.LogManager$1.run(LogManager.java:185)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:175)
at java.util.logging.Logger.getLogger(Logger.java:327)
at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55)
at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstr
ap.java:823)
at sun.management.Agent.startAgent(Agent.java:244)
at sun.management.Agent.startAgent(Agent.java:369)
WARNING: Failed to load the specified log manager class org.jboss.logmanager.Log
Manager
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
Caused by: java.lang.IllegalStateException: The LogManager was not properly inst
alled (you must set the "java.util.logging.manager" system property to "org.jbos
s.logmanager.LogManager")
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRe
positorySelector.java:42)
... 7 more
Press any key to continue . . .
Here is my standalone.conf.bat;
rem ### -*- batch file -*- ######################################################
rem # ##
rem # JBoss Bootstrap Script Configuration ##
rem # ##
rem #############################################################################
rem #
rem #
rem # Added by Derek Nkansah - 7th November 2012
rem # set JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager"
rem #
rem #
rem # $Id: run.conf.bat 88820 2009-05-13 15:25:44Z dimitris(a)jboss.org $
rem #
rem # This batch file is executed by run.bat to initialize the environment
rem # variables that run.bat uses. It is recommended to use this file to
rem # configure these variables, rather than modifying run.bat itself.
rem #
rem # Logging params added 8/11/2012
set JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager"
rem Uncomment the following line to disable manipulation of JAVA_OPTS (JVM parameters)
rem set PRESERVE_JAVA_OPTS=true
if not "x%JAVA_OPTS%" == "x" (
echo "JAVA_OPTS already set in environment; overriding default settings with values: %JAVA_OPTS%"
goto JAVA_OPTS_SET
)
rem #
rem # Specify the JBoss Profiler configuration file to load.
rem #
rem # Default is to not load a JBoss Profiler configuration file.
rem #
rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties"
rem #
rem # Specify the location of the Java home directory (it is recommended that
rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
rem #
set "JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09"
rem #
rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is
rem # not set. Default is "java".
rem #
rem set "JAVA=C:\opt\jdk1.6.0_23\bin\java"
rem #
rem # Specify options to pass to the Java VM. Note, there are some additional
rem # options that are always passed by run.bat.
rem #
rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"
rem # Reduce the RMI GCs to once per hour for Sun JVMs.
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true"
rem # Warn when resolving remote XML DTDs or schemas.
set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true"
rem # Make Byteman classes visible in all module loaders
rem # This is necessary to inject Byteman rules into AS7 deployments
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman"
rem set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.logmanager"
rem # Set the default configuration file to use if -c or --server-config are not used
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.server.default.config=standalone.xml"
rem # Sample JPDA settings for remote socket debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
rem # Sample JPDA settings for shared memory debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
rem # Use JBoss Modules lockless mode
rem set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.lockless=true"
rem # jmxremote operations added by Delboy - 7th November 2012
set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=10.206.18.194 -Dcom.sun.management.jmxremote.port=8686 -Dcom.sun.management.jmxremote.password.file="D:\jmxremote\jmxremote.password""
rem # Logging - Added 8/11/2012
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
:JAVA_OPTS_SET
set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:%JBOSS_HOME/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar"
Here is a copy of my standalone.bat;
@echo off
rem -------------------------------------------------------------------------
rem JBoss Bootstrap Script for Windows
rem -------------------------------------------------------------------------
echo JAVA_OPTS is %JAVA_OPT%
rem $Id$
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
if "%OS%" == "Windows_NT" (
set "DIRNAME=%~dp0%"
) else (
set DIRNAME=.\
)
rem Read an optional configuration file.
if "x%STANDALONE_CONF%" == "x" (
set "STANDALONE_CONF=%DIRNAME%standalone.conf.bat"
)
if exist "%STANDALONE_CONF%" (
echo Calling "%STANDALONE_CONF%"
call "%STANDALONE_CONF%" %*
) else (
echo Config file not found "%STANDALONE_CONF%"
)
pushd %DIRNAME%..
set "RESOLVED_JBOSS_HOME=%CD%"
popd
if "x%JBOSS_HOME%" == "x" (
set "JBOSS_HOME=%RESOLVED_JBOSS_HOME%"
)
pushd "%JBOSS_HOME%"
set "SANITIZED_JBOSS_HOME=%CD%"
popd
if "%RESOLVED_JBOSS_HOME%" NEQ "%SANITIZED_JBOSS_HOME%" (
echo WARNING JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
)
set DIRNAME=
if "%OS%" == "Windows_NT" (
set "PROGNAME=%~nx0%"
) else (
set "PROGNAME=standalone.bat"
)
rem Added by Derek Nkansah as per recommendations from SolarWinds
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
rem Setup JBoss specific properties
rem set JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%
rem set JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS%
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.port=1161"
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.interface=0.0.0.0"
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.snmp.acl=false
if "x%JAVA_HOME%" == "x" (
set JAVA=java
echo JAVA_HOME is not set. Unexpected results may occur.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
) else (
set "JAVA=%JAVA_HOME%\bin\java"
)
if not "%PRESERVE_JAVA_OPTS%" == "true" (
rem Add -client to the JVM options, if supported (32 bit VM), and not overriden
echo "%JAVA_OPTS%" | findstr /I \-server > nul
if errorlevel == 1 (
"%JAVA%" -client -version 2>&1 | findstr /I /C:"Client VM" > nul
if not errorlevel == 1 (
set "JAVA_OPTS=-client %JAVA_OPTS%"
)
)
rem Add compressed oops, if supported (64 bit VM), and not overriden
echo "%JAVA_OPTS%" | findstr /I "\-XX:\-UseCompressedOops \-client" > nul
if errorlevel == 1 (
"%JAVA%" -XX:+UseCompressedOops -version > nul 2>&1
if not errorlevel == 1 (
set "JAVA_OPTS=-XX:+UseCompressedOops %JAVA_OPTS%"
)
)
rem Add tiered compilation, if supported (64 bit VM), and not overriden
echo "%JAVA_OPTS%" | findstr /I "\-XX:\-TieredCompilation \-client" > nul
if errorlevel == 1 (
"%JAVA%" -XX:+TieredCompilation -version > nul 2>&1
if not errorlevel == 1 (
set "JAVA_OPTS=-XX:+TieredCompilation %JAVA_OPTS%"
)
)
)
rem Find jboss-modules.jar, or we can't continue
if exist "%JBOSS_HOME%\jboss-modules.jar" (
set "RUNJAR=%JBOSS_HOME%\jboss-modules.jar"
) else (
echo Could not locate "%JBOSS_HOME%\jboss-modules.jar".
echo Please check that you are in the bin directory when running this script.
goto END
)
rem Setup JBoss specific properties
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Set default module root paths
if "x%JBOSS_MODULEPATH%" == "x" (
set "JBOSS_MODULEPATH=%JBOSS_HOME%\modules"
)
rem Set the standalone base dir
if "x%JBOSS_BASE_DIR%" == "x" (
set "JBOSS_BASE_DIR=%JBOSS_HOME%\standalone"
)
rem Set the standalone log dir
if "x%JBOSS_LOG_DIR%" == "x" (
set "JBOSS_LOG_DIR=%JBOSS_BASE_DIR%\log"
)
rem Set the standalone configuration dir
if "x%JBOSS_CONFIG_DIR%" == "x" (
set "JBOSS_CONFIG_DIR=%JBOSS_BASE_DIR%/configuration"
)
echo ===============================================================================
echo.
echo JBoss Bootstrap Environment
echo.
echo JBOSS_HOME: %JBOSS_HOME%
echo.
echo JAVA: %JAVA%
echo.
echo JAVA_OPTS: %JAVA_OPTS%
echo.
echo ===============================================================================
echo.
:RESTART
"%JAVA%" %JAVA_OPTS% ^
"-Dorg.jboss.boot.log.file=%JBOSS_LOG_DIR%\boot.log" ^
"-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^
-jar "%JBOSS_HOME%\jboss-modules.jar" ^
-mp "%JBOSS_MODULEPATH%" ^
-jaxpmodule "javax.xml.jaxp-provider" ^
org.jboss.as.standalone ^
-Djboss.home.dir="%JBOSS_HOME%" ^
-Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"
%*
if ERRORLEVEL 10 goto RESTART
:END
if "x%NOPAUSE%" == "x" pause
:END_NO_PAUSE
Can you help?
Many thanks,
Derek
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> {noformat}
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by dpocock (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
dpocock commented on WFLY-895:
------------------------------
Understood - jmxetric no longer does any logging, it just gives one line on stdout to confirm it has loaded.
That is not the full story though - when the agent wants to interact with JMX, that causes the JBoss JMX code to be invoked before it is really ready. Not only does that cause JMX problems later (as in WFLY-3054), but the JBoss JMX code also tried to access the logger at this early stage in the boot process, it can't find it on the classpath and so startup fails.
The bootclasspath stuff helps the JBoss JMX code to survive the startup process but I agree this is not a desirable way to go about it.
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> {noformat}
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd commented on WFLY-895:
----------------------------------
And the JARs you've boot on the boot classpath only prove that out - you definitely do not want to do that as you'll end up with duplicate JARs and all kinds of other problems.
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> {noformat}
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd commented on WFLY-895:
----------------------------------
Anyway, this is probably caused by AspectJ setting up logging in its agent before the application does.
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> {noformat}
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd commented on WFLY-895:
----------------------------------
Fixed that up for you :)
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd updated WFLY-895:
-----------------------------
Description:
When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
{noformat}
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
JAVA: java
JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.modules.Module.run(Module.java:248)
at org.jboss.modules.Main.main(Main.java:313)
Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
... 7 more
{noformat}
was:
When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
JAVA: java
JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.modules.Module.run(Module.java:248)
at org.jboss.modules.Main.main(Main.java:313)
Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
... 7 more
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> {noformat}
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-895) JBoss crashes when run with AspectJ java agent
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-895?page=com.atlassian.jira.plugin.s... ]
David Lloyd edited comment on WFLY-895 at 3/4/14 9:02 AM:
----------------------------------------------------------
Here is a full diff of the workaround involving logging settings on the JVM command line, as used to get jmxetric versions before 1.0.5 to work with JBoss:
{noformat}
--- bin/standalone.conf
+++ ../jboss-as-7.1.0.Final.for-jmxetric/bin/standalone.conf
@@ -4,6 +4,7 @@
## ##
##############################################################################
+JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager"
#
# This file is optional; it may be removed if not needed.
#
@@ -48,6 +49,8 @@
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
+ JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:$JBOSS_HOME/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar -Xbootclasspath/p:$JBOSS_HOME/modules/org/jboss/logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar -Xbootclasspath/p:$JBOSS_HOME/modules/org/apache/log4j/main/log4j-1.2.16.jar"
+ JAVA_OPTS="$JAVA_OPTS -javaagent:$HOME/opt/ganglia/jmxetric/jmxetric-1.0.2.jar=host=jboss-host.example.org,port=8649,wireformat31x=true,config=$HOME/opt/ganglia/jmxetric/etc/jmxetric-jboss.xml"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
else
{noformat}
was (Author: dpocock):
Here is a full diff of the workaround involving logging settings on the JVM command line, as used to get jmxetric versions before 1.0.5 to work with JBoss:
--- bin/standalone.conf
+++ ../jboss-as-7.1.0.Final.for-jmxetric/bin/standalone.conf
@@ -4,6 +4,7 @@
## ##
##############################################################################
+JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager"
#
# This file is optional; it may be removed if not needed.
#
@@ -48,6 +49,8 @@
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
+ JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:$JBOSS_HOME/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar -Xbootclasspath/p:$JBOSS_HOME/modules/org/jboss/logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar -Xbootclasspath/p:$JBOSS_HOME/modules/org/apache/log4j/main/log4j-1.2.16.jar"
+ JAVA_OPTS="$JAVA_OPTS -javaagent:$HOME/opt/ganglia/jmxetric/jmxetric-1.0.2.jar=host=jboss-host.example.org,port=8649,wireformat31x=true,config=$HOME/opt/ganglia/jmxetric/etc/jmxetric-jboss.xml"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
else
> JBoss crashes when run with AspectJ java agent
> ----------------------------------------------
>
> Key: WFLY-895
> URL: https://issues.jboss.org/browse/WFLY-895
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Server
> Environment: OS X 10.7.2, Ubuntu 11.10
> Reporter: Jack Lund
> Assignee: David Lloyd
> Labels: aspectj, load_time_weaving
>
> When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
> =========================================================================
> JBoss Bootstrap Environment
> JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
> JAVA: java
> JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
> =========================================================================
> WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.jboss.as.server.Main.main(Main.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:248)
> at org.jboss.modules.Main.main(Main.java:313)
> Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
> at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
> at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
> ... 7 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (WFLY-822) MBean created via EAR/META-INF/jboss-service.xml from class defined in JBoss module gets wrong TCCL
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-822?page=com.atlassian.jira.plugin.s... ]
RH Bugzilla Integration commented on WFLY-822:
----------------------------------------------
Jan Martiska <jmartisk(a)redhat.com> changed the Status of [bug 1054984|https://bugzilla.redhat.com/show_bug.cgi?id=1054984] from ON_QA to VERIFIED
> MBean created via EAR/META-INF/jboss-service.xml from class defined in JBoss module gets wrong TCCL
> ---------------------------------------------------------------------------------------------------
>
> Key: WFLY-822
> URL: https://issues.jboss.org/browse/WFLY-822
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Class Loading, Server
> Environment: Java 6u31
> Reporter: Zachary Bedell
> Assignee: jaikiran pai
> Labels: classloader, mbean, modules
> Fix For: 8.0.0.Alpha3
>
> Attachments: SarTcclTst.tbz
>
>
> When an MBean is loaded from jboss-service.xml within an EAR, the TCCL should point to the EAR deployment so that config files and other resources can be classloaded from the EAR. Under JBoss 7.1.1.Final, the TCCL in a module loaded MBean's start() method is the module's ClassLoader. No reference to the EAR deployment's classloader is available, thus EAR resources are not available within the MBean.
> It appears that org.jboss.as.service.AbstractService::invokeLifecycleMethod() incorrectly sets the TCCL to the module's defining classloader rather than the EAR's:
> {{{
> protected void invokeLifecycleMethod(final Method method) throws InvocationTargetException, IllegalAccessException {
> if (method != null) {
> final ClassLoader old = SecurityActions.setThreadContextClassLoader(mBeanInstance.getClass().getClassLoader());
> try {
> method.invoke(mBeanInstance);
> } finally {
> SecurityActions.resetThreadContextClassLoader(old);
> }
> }
> }
> }}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months