Project

General

Profile

java.lang.ClassNotFoundException: tigase.management.MonitoringSetup

Raylin lin
Added almost 5 years ago

hi guys:

   I run tigase.sh on centos system  and got this error:

2014-02-11 15:58:41 ConfiguratorAbstract.initMonitoring() WARNING: Can not initialize monitoring:

java.lang.ClassNotFoundException: tigase.management.MonitoringSetup

    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:171)

    at tigase.conf.ConfiguratorAbstract.initMonitoring(ConfiguratorAbstract.java:988)

    at tigase.conf.ConfiguratorAbstract.init(ConfiguratorAbstract.java:527)

    at tigase.server.XMPPServer.main(XMPPServer.java:125)

Did i miss some jars? where can i download these jars? thank you.


Replies (4)

Added by Wojciech Kapcia TigaseTeam almost 5 years ago

Which Tigase version (and obtained from where) do you use? Did you build it yourself?

I'm assuming that you are trying to use monitoring (JMX perhaps?) on the build made by yourself. Please include in your runtime environment tigase-extras as it's necessary dependency to use monitoring.

Added by Raylin lin almost 5 years ago

hi Wojciech Kapcia,

     Thank you for your reply. I got tigase version 5.3  from this site. and after I put tigase-extras-1.1.1-SNAPSHOT.jar(also newest version got from this site and built by myself) in the tigase/jars path. run "./bin/tigase.sh start etc/tigase.conf &"  and got another new error:

2014-02-24 15:01:17.987 [main] ThreadExceptionHandler.uncaughtException() SEVERE: Uncaught thread: "main" exception

java.lang.NoClassDefFoundError: com/sun/management/snmp/agent/SnmpMibAgent

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:190)

    at tigase.conf.ConfiguratorAbstract.initMonitoring(ConfiguratorAbstract.java:975)

    at tigase.conf.ConfiguratorAbstract.init(ConfiguratorAbstract.java:256)

    at tigase.server.XMPPServer.start(XMPPServer.java:133)

    at tigase.server.XMPPServer.main(XMPPServer.java:112)

Caused by: java.lang.ClassNotFoundException: com.sun.management.snmp.agent.SnmpMibAgent

    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:425)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Class.java:190)

    at tigase.conf.ConfiguratorAbstract.initMonitoring(ConfiguratorAbstract.java:975)

    at tigase.conf.ConfiguratorAbstract.init(ConfiguratorAbstract.java:256)

    at tigase.server.XMPPServer.start(XMPPServer.java:133)

    at tigase.server.XMPPServer.main(XMPPServer.java:112)

Added by Wojciech Kapcia TigaseTeam almost 5 years ago

I'm sorry but I can't reproduce your issue. Where did you grabbed the binaries (5.3)? Do you put all libraries in proper places (i.e. jars/ directory)?

I've downloaded latest binaries:

wget http://build.tigase.org/nightlies/dists/2014-02-24/tigase-server-5.3.0-SNAPSHOT-b3459-dist-max.tar.gz

extracted them:

tar -xf tigase-server-5.3.0-SNAPSHOT-b3459-dist-max.tar.gz

configured Tigase and added monitoring to the init.properties:

--monitoring=jmx:9050,http:9080,snmp:9060
started the server and it worked:
2014-02-24 09:28:13.121 [main]             MonitoringSetup.initMonitoring()   CONFIG:   Installing monitoring services: jmx:9050,http:9080,snmp:9060
2014-02-24 09:28:13.123 [main]             MonitoringSetup.initMonitoring()   CONFIG:   Loading JMX monitor.
2014-02-24 09:28:13.292 [main]             MonitoringSetup.initMonitoring()   CONFIG:   Loading HTTP monitor.
2014-02-24 09:28:13.298 [main]             MonitoringSetup.initMonitoring()   CONFIG:   Loading SNMP monitor.

Please make sure you are putting files in correct locations!

Added by Raylin lin almost 5 years ago

hi Wojciech Kapcia:

  I got project source from https://projects.tigase.org/projects/tigase-server/repository and built it by myself,added monitoring to the init.properties:--monitoring=jmx:9050,http:9080,snmp:9060, that caused error.But I copied all jars from tigase-server-5.3.0-SNAPSHOT-b3459-dist-max/jars  to my project/jars  and it works now. 

    (1-4/4)