Remove the duplicate key from MYSQL when Spectrum Report Manager won't start.

Document ID : KB000050137
Last Modified Date : 14/02/2018
Show Technical Document Details


Customers running Spectrum 9.2 with Report Manager may see this in the stdout.log which prevents Report Manager from starting.

Sep 18, 2010 11:23:31 AM (Thread-55) (AssetManagerLogging) - (ERROR) - addDeviceModel()

Caused by: org.springframework.dao.DataIntegrityViolationException:

PreparedStatementCallback; SQL [UPDATE entity SET current_model_key=0 WHERE current_model_key=?]; Duplicate entry '0' for key 2; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:

Duplicate entry '0' for key 2


The fix is to manually remove the duplicate key from MYSQL.

delete from entity where current_model_key = 0;

Then restart the OneClick tomcat server.