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

NoClassDefFoundError: Could not initialize class sun.reflect.misc.Trampoline

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.13.4
    • Fix Version/s: 14.0.0
    • Component/s: Logging
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      development
    • Sprint:
      NMS Sprint 2

      Description

      Since a couple of days, sometimes I cannot start opennms.

      I always get a NoClassDefFoundError: Could not initialize class sun.reflect.misc.Trampoline

      The error seems to occur completly random.
      I was not able to reproduce it reliable.
      Usually it occurs when I do a clean.pl && compile.pl && assemble.pl -p dir and start OpenNMS afterwards with opennms -vt start

      The log:

      An error occurred while attempting to start the "OpenNMS:Name=Eventd" service (class org.opennms.netmgt.eventd.jmx.Eventd).  Shutting down and exiting.
      java.lang.NoClassDefFoundError: Could not initialize class sun.reflect.misc.Trampoline
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:190)
              at org.apache.logging.log4j.core.util.Loader.loadClassWithDefaultClassLoader(Loader.java:288)
              at org.apache.logging.log4j.core.util.Loader.loadClass(Loader.java:283)
              at org.apache.logging.log4j.core.impl.ThrowableProxy.loadClass(ThrowableProxy.java:509)
              at org.apache.logging.log4j.core.impl.ThrowableProxy.toExtendedStackTrace(ThrowableProxy.java:621)
              at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:170)
              at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:148)
              at org.apache.logging.log4j.core.impl.Log4jLogEvent.getThrownProxy(Log4jLogEvent.java:270)
              at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format(ExtendedThrowablePatternConverter.java:64)
              at org.apache.logging.log4j.core.pattern.PatternFormatter.format(PatternFormatter.java:36)
              at org.apache.logging.log4j.core.layout.PatternLayout.toSerializable(PatternLayout.java:189)
              at org.apache.logging.log4j.core.layout.PatternLayout.toSerializable(PatternLayout.java:53)
              at org.apache.logging.log4j.core.layout.AbstractStringLayout.toByteArray(AbstractStringLayout.java:52)
              at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:104)
              at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:86)
              at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:97)
              at org.apache.logging.log4j.core.appender.routing.RoutingAppender.append(RoutingAppender.java:112)
              at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:97)
              at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:428)
              at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:407)
              at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:365)
              at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:103)
              at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1347)
              at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1312)
              at org.apache.logging.slf4j.Log4jLogger.error(Log4jLogger.java:312)
              at org.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:299)
              at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:223)
              at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:247)
              at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:106)
              at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:184)
              at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:163)
              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:606)
              at org.opennms.bootstrap.Bootstrap$3.run(Bootstrap.java:365)
              at java.lang.Thread.run(Thread.java:724)
      

      Edit:
      I discovered, that if you add remote="true" to a package definition to the default collectd-configuration.xml you can reproduce the error.

        Attachments

          Activity

            People

            • Assignee:
              seth Seth Leger
              Reporter:
              mvr Markus von RĂ¼den
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: