Unable to map traps using MIB Tools after importing MIB into Spectrum and the interface hangs.

Document ID : KB000051206
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

After importing a new MIB into Spectrum MIB Tools all attributes are successfully mapped, but when we try to map a trap, the window just hangs after the severity is selected and the OK button is clicked. See the solution for full error syntax in the files stdout.log and catalina.out with MIB Tools Web Server debug turned on:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Solution:

In this example the problem was caused by an empty DESCRIPTION field in the MIB for the trap that was being imported. As a workaround, at least one character must be placed into the DESCRIPTION section of this part of the MIB, such as:

alertTrap NOTIFICATION-TYPE
        OBJECTS {
                alertTrapUpdateType,
                alertTrapAlertId,
                alertTrapControlM,
                alertTrapMemName,
                alertTrapOrderId,
                alertTrapSeverity,
                alertTrapStatus,
                alertTrapTime,
                alertTrapUser,
                alertTrapUpdateTime,
                alertTrapMessage,
                alertTrapOwner,
                alertTrapGroup,
                alertTrapApplication,
                alertTrapJobName,
                alertTrapNodeId,
                alertTrapType}
        STATUS current
        DESCRIPTION
                "New Description"
        ::= { controlmAlert 0 }

The following errors will be in the stdout.log and catalina.out files with MIB Tools Web Server debug turned on:

        java.lang.StringIndexOutOfBoundsException: String index out of range: -1
                at java.lang.String.substring(String.java:1937)
                at com.aprisma.spectrum.app.mib.common.MTMibNotification.setOrigDesc
        (MTMibNotification.java:152) (etc?)
 
        MIBToolsServlet.mapTraps results: errorCode: unexpectedError
        errorMsgObjs:
        exceptionMsg: String index out of range: -1
        supportList: empty
        failedLandscapes: empty