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

An exception is thrown if a notification is configured to have a subject with more than 256 characters

    XMLWordPrintable

Details

    Description

      This is related with customer support ticket number 1328.

      The customer needs to use the description of the event in the notification's subject. When this description is big, an exception is thrown with the following information:

      2012-05-22 03:36:01,353 ERROR [Notifd:BroadcastEventProcessor] BroadcastEventProcessor: Failed to enter notification into dat
      abase, exiting this notification
      org.postgresql.util.PSQLException: ERROR: value too long for type character varying(256)
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
      at org.opennms.netmgt.config.NotificationManager.insertNotice(NotificationManager.java:784)
      at org.opennms.netmgt.notifd.BroadcastEventProcessor.scheduleNoticesForEvent(BroadcastEventProcessor.java:611)
      at org.opennms.netmgt.notifd.BroadcastEventProcessor.onEvent(BroadcastEventProcessor.java:239)

      Of course, the notification won't be stored in the database, and no email will be sent to the destination targets.

      The solution is to alter the DB schema for the notification's table to change the type of the column "subject" from "varchar(256)" to "text".

      Attachments

        Issue Links

          Activity

            People

              agalue Alejandro Galue
              agalue Alejandro Galue
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: