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

Notifications are truncated at 4000 chars in database

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.8.17, 1.12.5
    • Fix Version/s: 1.12.7, 1.13.2
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      CentOS 5.6, RHEL 5.4, java 1.6

      Description

      When a notification is larger than 4000 chars, it's inserted in the database (table "notifications", column "textmsg") truncated to 4000 chars.

      If a notification is HTML-based, when presented in the WebApp, the layout of the list of notifications is going to be bogus.

      In my installation of version 1.8.17, I've patch:

      • "OnmsNotifcation.java" to remove the "@Column(size=4000)" annotation to method "getTextMsg()
      • NotificationManager.java to remove the hardcoded limitation to 4000 chars in method "insertNotice(..)"

      After some tests, the problem was resolved.

      Thanks to Alejandro Galue, who pinpointed the exact location of the problem. He's email is attached, to document the issue.

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              vitor.mendonca@brisa.pt Vitor Rui Moreira
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified