"Data truncation: Data too long for column 'resourceName' at row 1" error generated in the tomcat log while SRM is starting

Document ID : KB000112003
Last Modified Date : 23/08/2018
Show Technical Document Details
Issue:
While SRM is starting, you may see the following error in the tomcat log related a Service Manager Table in the SRM database:

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'resourceName' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3560) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2398) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2316) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2301) at com.aprisma.util.mysql.Database.write(Database.java:793) at com.aprisma.spectrum.app.slm.web.stat.SLMDbReadWrite.addResource(SLMDbReadWrite.java:3762) at com.aprisma.spectrum.app.slm.web.stat.SLMStatWatcher.addResourcesForMonitors(SLMStatWatcher.java:707) at com.aprisma.spectrum.app.slm.web.stat.SLMStatWatcher.doMonitorModelWork(SLMStatWatcher.java:563) at com.aprisma.spectrum.app.slm.web.stat.SLMStatWatcher.doModelWork(SLMStatWatcher.java:384) at com.aprisma.spectrum.app.slm.web.stat.SLMStatWatcher.access$1200(SLMStatWatcher.java:64) at com.aprisma.spectrum.app.slm.web.stat.SLMStatWatcher$InitializeDBTask.run(SLMStatWatcher.java:3179) at com.aprisma.util.thread.JobQueue.runJobThread(JobQueue.java:221) at com.aprisma.util.thread.JobQueue.access$000(JobQueue.java:15) at com.aprisma.util.thread.JobQueue$JobRunnable.run(JobQueue.java:24) at java.lang.Thread.run(Thread.java:745)
Environment:
CA Spectrum 10.1.x
CA Spectrum 10.2.x
Resolution:
Login to the OneClick server with Spectrum Report Manager installed and run the following commands to resolve the issue.

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

cd <SPECROOT>/mysql/bin

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

ALTER TABLE sm_resources MODIFY COLUMN resourceName varchar(500);

quit;

Restart Spectrum Tomcat to resolve the issue.
Additional Information:
If you have any additional questions please do not hesitate to reach out to CA Spectrum Support for further assistance.