CA Spectrum Report Manager SRM tomcat log file shows an error in regards to a Duplicate Column Name for AddArchivalEnabled

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

Issue:  After installing CA Spectrum 10.0 with OneClick and Spectrum Report Manager (SRM), the tomcat log shows a Report Manager exception:

 

Mar 10, 2015 08:16:09 AM (SRM/Startup/Container)

(com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeUpdater) -

(ERROR) - Error occurred while applying schema change

  Name: AddArchivalEnabled (Product version: 8.1.0) - Adds archival on and

off toggle (from SC823 - v.8.1.0)

com.aprisma.spectrum.app.web.db.schemachange.FatalSchemaChangeException:

com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeException: Error

occurred while running schema change script.

 

 Stdout:

 

  Stderr:

ERROR 1060 (42S21) at line 27 in file:

'C:\win32app\Spectrum\Install-Tools\rpmgr\sql\add_archival_on_off_field_823.

sql':

Duplicate column name 'ArchivalEnabled'

 at

com.aprisma.util.mysql.SQLScriptRunner.doRunSQLScript(SQLScriptRunner.java:2

51)

 at

com.aprisma.util.mysql.SQLScriptRunner.runScript(SQLScriptRunner.java:158)

 ... 51 more

 

Solution:

Update the schema change state to applied. To do that, you need to obtain the change_id from the table:

Run the following commands fom the <SPECROOT>/mysql/bin directory:

./mysql -uroot -proot reporting;

select * from schemaversion where name like 'AddArchivalEnabled'\G

You will see output similar to this:

*************************** 1. row ***************************

      change_id: 9

     session_id: 1

          name: AddArchivalEnabled

       category: Registry

schema_comments: Adds archival on and off toggle (from SC823 - v.8.1.0)

          major: 8

          minor: 1

   service_pack: 0

     start_time: 2015-03-10 16:38:05

       end_time: NULL

  duration_secs: NULL

          state: F

  state_details: com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeException: Error occurred while running schema change script.

The change_id is 9, so you then need to run:

mysql>update schemaversion set state='A' where change_id=9;

 

Stop and Restart Tomcat for the changes to take effect.