[
https://issues.jboss.org/browse/AS7-3681?page=com.atlassian.jira.plugin.s...
]
Kwaku Nkansah commented on AS7-3681:
------------------------------------
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: AS7-3681
URL:
https://issues.jboss.org/browse/AS7-3681
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.0.2.Final, 7.1.0.CR1b
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