We are getting an Error In USM every few seconds: Stack Trace: javax.persistence.PersistenceException: Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'insert_count'.

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

Problem:

every few seconds when we go into USm we are getting a pop-up error with the following stack trace:
com.firehunter.ump.exceptions.DataFactoryException : null

Stack Trace:
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'insert_count'.
 

Solution:

This problem is cause by and upgrade to NAS where for some reason the tables in the back end database
were not properly updated.
 
The First solution to try will not cause any loss of data.
Do the following:
1) deactivate NAS
2) run the following query:

ALTER TABLE NAS_TRANSACTION_SUMMARY ADD insert_count bigint constraint defaultzero default (0) not null;
CREATE NONCLUSTERED INDEX [NAS_IDX_TRANS_SUMMARY_03] ON [dbo].[NAS_TRANSACTION_SUMMARY] ([insert_count])
GO

3) activate NAS
4) deactivate and activate wasp and test
 
The Second solution WILL CAUSE data loss from the back end SQL server:
1) deactivate NAS
2) drop all of he nas_* tables in the back end SQL server.
example:
 drop table nas_alarms;

3) activate NAS
4) deactivate and activate wasp and test