search cancel

Global sync failing after upgrade to 22.2.2

book

Article ID: 253043

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

Global sync is failing with the following error: 

INFO   | jvm 1    | 2022/10/20 12:39:52 | ERROR | pool-6-thread-1          | 2022-10-20 12:39:52,870 | com.ca.im.portal.dm.productsync.DataSourcePoller                 
INFO   | jvm 1    | 2022/10/20 12:39:52 |       | Exception thrown by sync task: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [CREATE TABLE GlobalSyncCachedItemsTmp (PRIMARY KEY(t_ItemID, i_ItemID)) AS SELECT t.ItemID AS t_ItemID, i.ItemID AS i_ItemID, o.AlternateName AS o_AlternateName, o.ItemName AS o_ItemName, o.LifeCycleState AS o_LifeCycleState, o.LifeCycleStateLastChangedOn AS o_LifeCycleStateLastChangedOn FROM items i INNER JOIN item_members im ON i.ItemID=im.ParentID AND i.ItemType=101 INNER JOIN t_component o ON i.ItemID=o.ItemID INNER JOIN t_address t ON im.ChildID=t.ItemID WHERE (im.UpdatedOn>=1666109961 OR i.UpdatedOn>=1666109961 OR t.OwnerItemID IS NULL)]; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'o.LifeCycleState' in 'field list'
INFO   | jvm 1    | 2022/10/20 12:39:52 | java.util.concurrent.ExecutionException: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [CREATE TABLE GlobalSyncCachedItemsTmp (PRIMARY KEY(t_ItemID, i_ItemID)) AS SELECT t.ItemID AS t_ItemID, i.ItemID AS i_ItemID, o.AlternateName AS o_AlternateName, o.ItemName AS o_ItemName, o.LifeCycleState AS o_LifeCycleState, o.LifeCycleStateLastChangedOn AS o_LifeCycleStateLastChangedOn FROM items i INNER JOIN item_members im ON i.ItemID=im.ParentID AND i.ItemType=101 INNER JOIN t_component o ON i.ItemID=o.ItemID INNER JOIN t_address t ON im.ChildID=t.ItemID WHERE (im.UpdatedOn>=1666109961 OR i.UpdatedOn>=1666109961 OR t.OwnerItemID IS NULL)]; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'o.LifeCycleState' in 'field list'
INFO   | jvm 1    | 2022/10/20 12:39:52 |  at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:?]

 

Environment

Release : 22.2

Cause

This is a defect (DE548934) fixed in 22.2.4

Resolution

To resolve this issue

mysql -unetqos -p<PASSWORD> netqosportal

mysql> replace into netqosportal.general values ('GlobalSync.Update.UseTempTable','false');

mysql> replace into netqosportal.general values ('GlobalSync.Replace.UseTempTable','false');

mysql> replace into netqosportal.general values ('GlobalSync.CachedItems.UseTempTable','false');

mysql>\q