Skip to main content
Kofax

Upgrade fails with Classification group ClassificationGroupName does not exist

3023963

Question / Problem: 

What may be the problem if an upgrade fails with the message in the log saying “Classification group [ClassificationGroupName] does not exist"?

Answer / Solution: 

This problem occurs under the following conditions:

  • Upgrading from KTA 7.5 or lower to KTA 7.6, 7.7, or 7.8. 
  • The upgrade of the database completes with errors and says “Error: Upgrading database artifacts.” 
  • The KofaxTotalAgilityInstallErrorLog.txt log on the desktop reports the error “Classification group [ClassificationGroupName] does not exist." 

Once this error occurs, a backup of the database will need to be restored to continue.

The error may be caused by a process in the system with an invalid link to a classification group that doesn’t exist.  To identify any processes in this state, run the following query against the main TotalAgility database:

SELECT bp.PROCESS_NAME, SETTINGS_XML,
SETTINGS_XML.value('/BusinessProcessSettings[1]/CaptureProcessSettings[1]/ClassificationGroup[1]/Id[1]','NVARCHAR(100)') AS ClsId,
SETTINGS_XML.value('/BusinessProcessSettings[1]/CaptureProcessSettings[1]/ClassificationGroup[1]/Name[1]','NVARCHAR(100)') AS ClsName
FROM BUSINESS_PROCESS AS bp
WHERE SETTINGS_XML.value('/BusinessProcessSettings[1]/CaptureProcessSettings[1]/ClassificationGroup[1]/Id[1]','NVARCHAR(100)')=''
AND SETTINGS_XML.value('/BusinessProcessSettings[1]/CaptureProcessSettings[1]/ClassificationGroup[1]/Name[1]','NVARCHAR(100)')<>''

Any processes listed from this query are in an invalid state.  Either fix the processes by reassigning a valid classification group, or delete the processes.  Then attempt the upgrade again.

Alternatively, upgrade to KTA 7.9 or higher, which has been improved to ignore the invalid data.

Additional Information

Note that if you try to initiate the upgrade of database artifacts again (by running C:\Program Files\Kofax\TotalAgility\Agility.Server.Web\bin\Agility.Installation.Server.Upgrade.exe), it will produce a different error, because the following columns have already been converted to XML columns, and the conversation cannot run again now that the database is in a partially converted state:

  • DECISION.DECISION_TEXT
  • ACTIVITY_INFO.EXIT_CONDITION
  • NODE_BRANCHING_RULES.CONDITION_TEXT
  • ACTIVITY.PRECONDITION_TEXT

The error from Agility.Installation.Server.Upgrade.exe at this point will be the following:

System.Data.SqlClient.SqlException: The data types xml and varchar are incompatible in the not equal to operator.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteReader(DbCommand command, CommandBehavior cmdBehavior)
   at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command)
   at Agility.Server.Common.Database.DatabaseAccessor.<>c__DisplayClass19_0.<ExecuteReader>b__0()
   at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
   at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction(Action action)
   at Agility.Server.Common.ErrorHandling.RetryHandler.ExecuteAction(Action action, RetryType retryType, Int16 maxRetryCount, Nullable`1 initialInterval, Nullable`1 increment)
   at Agility.Server.Common.ErrorHandling.RetryHandler.ExecuteAction(Action action, RetryType retryType, Int16 maxRetryCount)
   at Agility.Server.Common.Database.DatabaseAccessor.ExecuteReader(DatabaseCommand command)
   at Agility.Server.Repository.SqlCommon.UpgradeCommonRepository.ReadRules(String sql, RuleEditorType editorType)
   --- End of inner exception stack trace ---
   at Agility.Server.Repository.SqlCommon.UpgradeCommonRepository.ReadRules(String sql, RuleEditorType editorType)
   at Agility.Server.Repository.SqlCommon.UpgradeCommonRepository.GetRules(RuleEditorType editorType)
   at Agility.Server.Core.Upgrade.UpgradeReader.GetRulesOfType(RuleEditorType editorType)
   at Agility.Server.Core.Upgrades.RuleUpgrader.UpgradeOldRulesOfType(RuleEditorType ruleEditorType)
   at Agility.Server.Core.Upgrades.RuleUpgrader.UpgradeOldRules()
   at Agility.Server.Upgrade.UpgradeDatabase.UpgradeDatabaseArtifacts(String sessionId, UpgradeOptions upgradeOptions)
   at Agility.Installation.Server.Upgrade.Program.Main(String[] args)