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

Notifications cannot contain non-ASCII characters and will cause NPEs

    XMLWordPrintable

    Details

      Description

      Having any kind kind of UTF-chars in the description tag (<description>Full på C:-disk / SERVER, Alexander tester</description>) causes this dump:

      Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence.
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:709)
      at org.opennms.core.xml.CastorUtils.unmarshal(CastorUtils.java:217)
      at org.opennms.core.xml.CastorUtils.unmarshal(CastorUtils.java:212)
      at org.opennms.netmgt.config.NotificationManager.parseXML(NotificationManager.java:169)
      at org.opennms.netmgt.config.NotificationFactory.reload(NotificationFactory.java:132)
      at org.opennms.netmgt.config.NotificationFactory.update(NotificationFactory.java:159)
      at org.opennms.netmgt.config.NotificationManager.hasUei(NotificationManager.java:183)
      at org.opennms.netmgt.notifd.BroadcastEventProcessor.scheduleNoticesForEvent(BroadcastEventProcessor.java:511)
      at org.opennms.netmgt.notifd.BroadcastEventProcessor.onEvent(BroadcastEventProcessor.java:217)
      at org.opennms.netmgt.eventd.EventIpcManagerDefaultImpl$ListenerThread.run(EventIpcManagerDefaultImpl.java:175)
      at java.lang.Thread.run(Thread.java:662)

      This is problematic because there is a limit to how much we can avoid use of localised chars when writing informative message to recipients.

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              alexh@boxed.no Alexander Hoogerhuis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: