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

ArrayIndexOutOfBoundsException during error handling in SNMP MIB Compiler

    XMLWordPrintable

    Details

    • Sprint:
      Horizon - April 17th 2019

      Description

      During a workshop at customer site, we tried to compile the attached MIB file with the SNMP MIB Compiler. As the MIB is not correct (wrong "=" character in line 1355), the MIB compiler throwed the following error:

      With that error message, it is really hard to debug the MIB. I also remembered, that I got better error messages in the past from the MIB compiler. So analysed a bit and found the following Exception in karaf.log:

      2019-04-08 16:01:19,057 ERROR org.opennms.features.mib-compiler:2017.1.11(159) [qtp194085548-1194] org.opennms.features.mibcompiler.services.JsmiMibP
      arser: Can't compile /opt/opennms/share/mibs/pending/G6-NOTIFICATION-MIB_0.20.mib
      java.lang.ArrayIndexOutOfBoundsException: 3
              at org.opennms.features.mibcompiler.services.OnmsProblemEventHandler.getMibFromSource(OnmsProblemEventHandler.java:170)[159:org.opennms.featu
      res.mib-compiler:2017.1.11]
              at org.opennms.features.mibcompiler.services.OnmsProblemEventHandler.print(OnmsProblemEventHandler.java:186)[159:org.opennms.features.mib-com
      piler:2017.1.11]
              at org.opennms.features.mibcompiler.services.OnmsProblemEventHandler.handle(OnmsProblemEventHandler.java:110)[159:org.opennms.features.mib-co
      mpiler:2017.1.11]
              at org.jsmiparser.util.problem.ProblemInvocationHandler$MethodInvocationHandler.invoke(ProblemInvocationHandler.java:138)[159:org.opennms.fea
      tures.mib-compiler:2017.1.11]
              at org.jsmiparser.util.problem.ProblemInvocationHandler.invoke(ProblemInvocationHandler.java:66)[159:org.opennms.features.mib-compiler:2017.1
      .11]
              at com.sun.proxy.$Proxy263.reportTokenStreamError(Unknown Source)[159:org.opennms.features.mib-compiler:2017.1.11]
              at org.jsmiparser.phase.file.FileParserPhase.parse(FileParserPhase.java:113)[159:org.opennms.features.mib-compiler:2017.1.11]
              at org.jsmiparser.phase.file.FileParserPhase.process(FileParserPhase.java:78)[159:org.opennms.features.mib-compiler:2017.1.11]
              at org.jsmiparser.parser.SmiDefaultParser.parse(SmiDefaultParser.java:59)[159:org.opennms.features.mib-compiler:2017.1.11]
              at org.opennms.features.mibcompiler.services.JsmiMibParser.parseMib(JsmiMibParser.java:158)[159:org.opennms.features.mib-compiler:2017.1.11]
              at Proxy15372e21_56db_4132_80d4_fab24cba729d.parseMib(Unknown Source)[:]
              at org.opennms.features.vaadin.mibcompiler.MibCompilerPanel.parseMib(MibCompilerPanel.java:345)[158:org.opennms.features.vaadin-snmp-events-a
      nd-metrics:2017.1.11]
              at org.opennms.features.vaadin.mibcompiler.MibCompilerPanel.access$1000(MibCompilerPanel.java:64)[158:org.opennms.features.vaadin-snmp-events
      -and-metrics:2017.1.11]
              at org.opennms.features.vaadin.mibcompiler.MibCompilerPanel$2.handleAction(MibCompilerPanel.java:268)[158:org.opennms.features.vaadin-snmp-ev
      ents-and-metrics:2017.1.11]
              at com.vaadin.ui.Tree.changeVariables(Tree.java:533)[114:com.vaadin.server:7.2.7]
      [...]

      So, there seems to be an issue during the error handling of the SNMP MIB compiler.

       

      The mib2events tool (which I could not find in the Meridian repository), found the error in the MIB:

        Error: in G6-NOTIFICATION-MIB_0.20.mib: line 1355:
          unexpected character '='

        Attachments

          Activity

            People

            • Assignee:
              cpape Christian Pape
              Reporter:
              michael_nt Michael Batz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: