-
1. Re: Enabling SNMP in JBoss 7
matt.trisoline Feb 21, 2013 3:53 PM (in response to shaun.kalley)I am also having this same issue. Is it not possible to use the native Java SNMP with Jboss7?
Starting jboss-as: WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
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(DelegatingMethodAccessorImpl.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 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
Are there any workarounds for this or is there a different native way to retrieve data through SNMP?
-
2. Re: Enabling SNMP in JBoss 7
dmlloyd Feb 22, 2013 5:47 PM (in response to matt.trisoline)This should be possible to do, just not in the usual way. I'll look around a little bit.
-
3. Re: Enabling SNMP in JBoss 7
dmlloyd Feb 22, 2013 6:24 PM (in response to dmlloyd)The only way I see this working is by manually bootstrapping the SNMP adapter class after the container starts instead of using the agent. You should be able to do this from within a deployment for example, by calling sun.management.snmp.AdaptorBootstrap#initialize() directly. If you use a POJO deployment you can probably do it with just an XML descriptor.
-
4. Re: Enabling SNMP in JBoss 7
scarlson Feb 25, 2013 3:22 PM (in response to dmlloyd)Stumbled on this and it worked for me. I did have to add <path name="sun/management/snmp"/> to modules/sun/jdk/main/module.xml .
Thanks
-
5. Re: Enabling SNMP in JBoss 7
allenjames Sep 24, 2013 10:57 AM (in response to scarlson)This solution work for me as well, but i also had to include <path name="sun/management"/> in addition to the <path name="sun/management/snmp"/> to modules/sun/jdk/main/module.xml
-
6. Re: Enabling SNMP in JBoss 7
bha007 Jan 9, 2014 10:25 AM (in response to scarlson)Hi,
Can you explain a little more how you got it running? Did you write a class for that?
I did the setup part but I miss the activation...
Thanks
-
7. Re: Enabling SNMP in JBoss 7
allenjames Jan 9, 2014 4:01 PM (in response to bha007)Hi Bruno,
Yes, I wrote a class which invokes the AdaptorBootstrap.initialize() method that David Lloyd mentioned in his post. We packed that class in an ear file which is deployed upon start-up of the JBoss server.
Hope this helps.