ERROR - Failed to add new alarm title record. Data truncation: Data too long for column 'title' at row 1
search cancel

ERROR - Failed to add new alarm title record. Data truncation: Data too long for column 'title' at row 1

book

Article ID: 39767

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

The below errors are continuously coming up in Tomcat logs:(SRM/AlarmHandler/bucketReader) (SRM_Alarms) - (ERROR) - Failed to add new alarmtitle record Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [INSERT INTO alarmtitle (cause_id, title) VALUES (?, ?)]; Data truncation: Data too long for column 'title' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1

Environment

Release: Any
Component: Spectrum Report Manager

Cause

We get this error, because there was not enough space to save the Title in the Database from Report Manager "SQL [INSERT INTO Alarmtitle (cause_id, title) Values (?,?]; Data truncation: Data too long for column 'title' at row 1;" 

There is a process in SRM that is trying to save data into the Alarmtitle Column, but the data was bigger than that was allowed to save in that field. So basically the resolution is to increase the size of the Column in order to avoid this error.

 

Resolution

NOTE:  In the following MySql commands, replace <PASSWD> with the root password for your DX NetOps Spectrum version.

1. Log into the Spectrum Report Manager system as the user that owns the Spectrum installation

2. If on Windows, start a bash shell by running "bash -login"

3. cd to the $SPECROOT/mysql/bin directory

4. Enter the following command to log into mysql:


./mysql --defaults-file=../my-spectrum.cnf -uroot -p<PASSWD> reporting

5. Enter the following command at the mysql prompt:


ALTER TABLE alarmtitle MODIFY COLUMN title varchar(1000);

6. Exit mysql and restart tomcat