SRM security_string_accessibility Exception during Tomcat startup

book

Article ID: 130124

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

If you notice that Spectrum Report Manager does not start properly, you should look in the Spectrum tomcat log file and see if the following error is displayed causing SRM to not start properly:

PreparedStatementCallback; SQL [INSERT INTO security_string_accessibility( oc_user_id, security_string_id ) VALUES ( ?, ? )]; Duplicate entry '1472-261' for key 'unq_user_name'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1472-261' for key 'unq_user_name' at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)

NOTE: The oc_user_id and security_string_id values (1472 & 261 in this case) may be different.

Cause

There is a duplicate entry for a key in the security_string_accessibility table.

Environment

Spectrum 10.2.x
Spectrum 10.3.x

Resolution

To resolve this error, you will need to run the following commands on the OneClick server with SRM installed:

Windows:

Open a command prompt and type the following commands:

bash -login
cd <SPECROOT>/mysql/bin
./mysql -uroot -proot reporting -A
delete from security_string_accessibility where oc_user_id=1472 and security_string_id=261;
quit;

Linux:

cd <SPECROOT>/mysql/bin
./mysql --defaults-file=../my-spectrum.cnf -uroot -proot reporting -A
delete from security_string_accessibility where oc_user_id=1472 and security_string_id=261;
quit;

NOTE: In the above commands you will need to change the integer values for both the oc_user_id and the security_string_id to match those that are shown in the exception.

Once the above command has been run, please restart Spectrum Tomcat to resolve the issue.

Additional Information

If you have any other questions or concerns, please do not hesitate to contact Spectrum Product Support.