"Data truncation: Data too long for column 'error_message'" in CA Spectrum

book

Article ID: 142389

calendar_today

Updated On:

Products

CA Spectrum CA eHealth

Issue/Introduction

There are several error in the tomcat log is as follows:

"Data truncation: Data too long for column 'error_message'"

Cause

This mySQL column is found in the netqos_integ database:

mysql> select TABLE_NAME, COLUMN_NAME from information_schema.columns where column_name like 'error_message';

+--------------------+---------------+
| TABLE_NAME         | COLUMN_NAME   |
+--------------------+---------------+
| item_model_mapping | error_message |
+--------------------+---------------+
1 row in set (0.20 sec) 

 

and is described as follows:

mysql> show columns from item_model_mapping;

+------------------------+------------------+------+-----+---------+----------------+
| Field                  | Type             | Null | Key | Default | Extra          |
+------------------------+------------------+------+-----+---------+----------------+
| item_model_mapping_key | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| landscape_h            | int(10) unsigned | NO   | MUL | NULL    |                |
| item_id                | int(10) unsigned | NO   |     | NULL    |                |
| model_handle           | int(10) unsigned | NO   |     | NULL    |                |
| record_updatedon       | int(10) unsigned | NO   | MUL | NULL    |                |
| model_updatedon        | int(10) unsigned | YES  | MUL | NULL    |                |
| error_message          | varchar(64)      | YES  |     | NULL    |                |
+------------------------+------------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)

Environment

Spectrum 10.3 or later

Resolution

Please increase this column size to fit the size of your error messages. For some users 500 is enough but for others 1,000 is necessary.

On Windows, please open a bash shell (bash -login).

  1. cd $SPECROOT/mysql/bin

  2. In windows, run;

    mysql -uroot -proot netqos_integ


    or in Linux

    ./mysql --defaults-file=../my-spectrum.cnf -uroot -proot netqos_integ

  3. At the MySQL prompt, run;

    ALTER TABLE item_model_mapping MODIFY COLUMN error_message varchar(1000);


    quit;

  4. Restart Spectrum Tomcat to resolve the issue.