Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jboss log manager error

Tags:

jboss

I am trying to start up JBoss with parameters in Windows but getting some errors. If I remove parameters than JBoss startup iwht no errors. Could some one please take a look.

environment variables:

JAVA_HOME=C:\Java\jdk1.6.0_45
JBOSS_HOME=C:\bin\jboss-eap-6.1
Path=C:\Java\jdk1.6.0_45\bin;C:\WINDOWS\system32;

start up jboss with following parameters:

set "JAVA_OPTS=%JAVA_OPTS% 
    -Djava.rmi.server.hostname=myhost
    -Dcom.sun.management.jmxremote.port=myport
    -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=true
   -Dcom.sun.management.jmxremote.password.file=C:\Java\jdk\jre\lib\management\jmx.password
   -Dcom.sun.management.jmxremote.access.file=C:\Java\jdk\jre\lib\management\jmx.access
"

Error:

WARNING: failed to load the specified log manager class org.jboss.logmanager.LogManager
Error: Operation <"parallel-extension-add"> failed - address:<[]>
                   java.lang.RuntimeException: failed initializing module org.jboss.as.logging

==========================================================================

so to fix the error above. I have added logmanager parameter below.

start up jboss using parameters:

set "JAVA_OPTS=%JAVA_OPTS%
-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Djava.rmi.server.hostname=myhost
-Dcom.sun.management.jmxremote.port=myport
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=C:\Java\jdk\jre\lib\management\jmx.password
-Dcom.sun.management.jmxremote.access.file=C:\Java\jdk\jre\lib\management\jmx.access
​"

ERROR:

Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.logManager

==========================================================================

so to fix error above. I have added -xbootclasspath parameter.

start up jboss using parameters:

set "JAVA_OPTS=%JAVA_OPTS%
-Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-Xbootclasspath:C:\bin\jboss-eap-6.1\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-1.4.0.Final-redhat-1.jar

-Djava.rmi.server.hostname=myhost
-Dcom.sun.management.jmxremote.port=myport
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=C:\Java\jdk\jre\lib\management\jmx.password
-Dcom.sun.management.jmxremote.access.file=C:\Java\jdk\jre\lib\management\jmx.access
​"

ERROR:

Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

and now I have no idea what to do. I have tried reinstalling jdk but no luck.

when I enter "java -version" in CMD. Than I get result: "1.6.0_45". So I know jdk is set up. but when I start Jboss than jdk is not initialization.

like image 628
user1924249 Avatar asked Jun 25 '14 01:06

user1924249


1 Answers

To resolve this, do the following:

  1. Go to the JBOSS_HOME location on the file system e.g. c:\jboss\appserver\jboss-eap-6.3, look in the bin folder and open the configuration file named, standalone.conf, in a text editor.

  2. At the top of the file, add the following line - JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager".

  3. Scroll-down the file, to where JVM options are specified and add the following two options:

JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager" JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-1.5.2.Final-redhat-1.jar"

Note: You may need to modify the exact path to the logmanager jar file, as the one on your jboss installation may differ from what applies here. The JBoss EAP version being used in this case was 6.3.0GA. A different version may have a different path to the logmanager jar file.

  1. Simply save the modified 'standalone.conf' file, with these couple of changes, and re-attempt starting up of the JBoss App server (either on the CLI or within Eclipse).

Note: For fixing the issue for a JBoss EAP appserver instance running just within Eclipse, simply open the server's launch configuration and add the 2 JVM options to the VM arguments of the launch configuration, as shown in the screenshot below:

  1. Voila! The startup issue with regards to failure to load the LogManager, should be resolved. Check this blogpost for details and screenshots - http://obinnakalu.blogspot.com/2014/10/jboss-enterprise-application-platform.html
like image 57
Obinna Kalu Avatar answered Sep 29 '22 04:09

Obinna Kalu