Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5889

System report not working with RPMs (ClassNotFoundException on ServiceRegistry)



    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 1.11.91
    • 1.11.91
    • Build / Packaging
    • Security Level: Default (Default Security Scheme)
    • Any 1.11.91-snapshot system installed from RPMs. Seen on mephesto (opennms-1.11.91-0.20130424.16) and barbrady (opennms-1.11.91-0.20130520.1.noarch)


      Marking as a blocker because this stops system-report working from the command line, which is necessary for systems on which the webapp is not running.

      Steps to reproduce:

      1. Run /opt/opennms/bin/system-report as root

      Expected result:

      A system report comes out

      Actual result:

      The command exits after spitting out the following exception stack trace:

      [root@barbrady ~]# /opt/opennms/bin/system-report
      Exception in thread "main" java.lang.NoClassDefFoundError: org/opennms/core/soa/ServiceRegistry
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
      at java.lang.Class.getMethod0(Class.java:2670)
      at java.lang.Class.getMethod(Class.java:1603)
      at org.opennms.bootstrap.Bootstrap.executeClass(Bootstrap.java:341)
      at org.opennms.systemreport.SystemReport.main(SystemReport.java:64)
      Caused by: java.lang.ClassNotFoundException: org.opennms.core.soa.ServiceRegistry
      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:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 6 more

      Further notes:
      I do not see this problem if I run the system report from the webapp on the same system (barbrady) with all plugins selected and "text" as the output format. Haven't tried other permutations.

      Also, if I run system-report from the command line on a Fedora 17 system installed from source pulled and build on 22 May 2013, I get a good report which includes the following log message at the top:

      2013-05-23 12:25:22,708 WARN [Main] org.hibernate.cfg.AnnotationBinder: Package not found or wo package-info.java: org.opennms.netmgt.dao.hibernate




            ranger Benjamin Reed
            jeffg Jeff Gehlbach
            0 Vote for this issue
            2 Start watching this issue