Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.10.3
-
Fix Version/s: 1.10.4
-
Component/s: Notifications/Actions
-
Security Level: Default (Default Security Scheme)
-
Labels:
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".
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".