Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT

Qlik Sense Repository Service fails with Error An exception was thrown while invoking the constructor 'Void .ctor()' on type 'DatabaseContext

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Aaryan
Former Employee
Former Employee

Qlik Sense Repository Service fails with Error An exception was thrown while invoking the constructor 'Void .ctor()' on type 'DatabaseContext

Last Update:

Mar 1, 2024 9:35:25 AM

Updated By:

Sonja_Bauernfeind

Created date:

Mar 24, 2022 10:42:15 AM

If your Qlik Sense Enterprise on Windows version is not compatible with the QSR database. 

This may occur if:

  • You have upgraded Qlik Sense (for example: from May 2023 to November 2023) and have started the services. This will have migrated your QSR database from the May 2023 schema to the November 2023 schema.

    You have then decided to roll back to May 2023 and are attempting to restore the November 2023 QSR. They are not compatible and the migration will fail.

    the DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.

  • If an incorrect version was installed during an upgrade of a Qlik Sense Enterprise on Windows multi node environment, such as installing different versions on RIM nodes, the Qlik Sense Repository service will not start on any node (including the central node). 

An incorrect version of Qlik Sense Enterprise on Windows in a multi node environment will trigger a database migration to this version. The result is that the Qlik Sense Repository service fails to start with the error: 

Fatal exception during startup Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.↵↓An exception was thrown while invoking the constructor 'Void .ctor()' on type 'DatabaseContext

Resolution

 

As database migration started which had caused database corruption, you need to revert back to the old database backup to resolve this issue or contact Qlik Support for assistance.

 

Internal Investigation ID(s)

QB-8813

Environment

Qlik Sense Enterprise on Windows all versions

Labels (1)
Comments
allann
Contributor III
Contributor III

If we accidentally install a newer version (Nov22) on a rim node, while the central and other rim nodes are on an older (May22), do we have to reinstall everything?

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @allann 

There are three options:

  1. If you have not started the rim node after upgrading it (meaning it has not connected to your central database), then you can uninstall the rim node and re-install it on May 2022.
  2. If you have started the rim node after the upgrade (meaning it has connected to your central database and made changes that cannot be reversed), then you will be unable to reconnect the rim node on May 2022. You will need to either:
    1. Revert to a previous backup of your Qlik Sense deployment taken before the rim node was upgraded (see Backup and restore Qlik Sense Enterprise on Windows ), as well as reinstall the rim on the old version. 
    2. Upgrade your entire deployment to November 2022 (recommended).

Hope this helps!

All the best,
Sonja 

 

Version history
Last update:
‎2024-03-01 09:35 AM
Updated by: