"Failed to add new wirelessap record" seen in the Spectrum Report Manager (SRM) log file

book

Article ID: 111187

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

The following error is seen in the in the Spectrum Report Manager (SRM) $SPECROOT/tomcat/logs/stdout.log (Windows) or catalina.out (Linix) file:

Aug 11, 2018 14:57:30.753 (SRM/WirelessAPsHandler/bucketReader) (com.aprisma.spectrum.app.repmgr.dc.event.handler.WirelessAPsHandler) - (ERROR) - Failed to add new wirelessap record Aug 11, 2018 14:57:30.753 (SRM/WirelessAPsHandler/bucketReader) (com.aprisma.spectrum.app.repmgr.dc.event.handler.WirelessAPsHandler) - (ERROR) - Failed to add new wirelessap record Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO wirelessaps (event_key, timestamp, controller_mh, ap_mh, ap_grpName, clients_connected, data_sent, data_received) VALUES (?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'reporting.wirelessaps' doesn't exist

Environment

Release: Any
Component: SPCOCK

Resolution

Create the wirelessaps table by doing the following:

1. Log into the SRM system as the user that owns the Spectrum installation

2. If on Windows, start a bash shell by running "bash -login"

3. cd to the $SPECROOT/tomcat/bin directory and enter the following command to stop tomcat:

./stopTomcat.sh

4. cd to the $SPECROOT/mysql/bin directory and enter the following command to log into mysql:

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

5. Enter the following command at the mysql prompt to create the wirelessaps table:


CREATE TABLE `wirelessaps` ( `ap_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_key` bigint(20) unsigned NOT NULL, `timestamp` datetime NOT NULL, `controller_mh` int(10) unsigned NOT NULL, `ap_mh` int(10) unsigned NOT NULL, `ap_grpName` varchar(255) NOT NULL, `clients_connected` int(10) unsigned DEFAULT '0', `data_sent` bigint(20) unsigned DEFAULT '0', `data_received` bigint(20) unsigned DEFAULT '0', PRIMARY KEY (`ap_id`), KEY `idx_controller_mh` (`controller_mh`), KEY `idx_ap_mh` (`ap_mh`), KEY `idx_ap_grpName` (`ap_grpName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
mysql>exit

6. cd to the $SPECROOT/tomcat/bin directory and enter the following command to start tomcat:

./startTomcat.sh

7. Check the SRM $SPECROOT/tomcat/logs/stdout.log (Windows) or catalina.out (Linix) file for the error