K2 5.0 to K2 5.1 upgrade failed with error: "One or more items was not found"

  • 16 February 2021
  • 0 replies
  • 81 views

Userlevel 5
Badge +20
 

K2 5.0 to K2 5.1 upgrade failed with error: "One or more items was not found"

kbt148035

PRODUCT
K2 Five 5.1
BASED ON
K2 Five 5.1
TAGS
Upgrading
Package and Deploy
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

After performing a K2 5.0 to K2 5.1 upgrade, the Configuration Analysis Tool reported that the following P&D packages did not deploy successfully:

Image

 

After clicking the "Apps" button in Workspace, we received the following error:
"Object reference not set to an instance of an object"
 

Image

Symptoms

Looking at the installer trace logs, the following error was found:

 

"Error: System.Exception: One or more items was not found
Guid: 'a5d9c236-0d64-4e67-b9f0-01e098c83e36';ContextType: 'View'
Guid: '3d6194f4-2311-42c6-b0df-78e4956fff7a';ContextType: 'View'"

 

After running a SELECT query on the "Form.View" and "Form.View_Design tables", I did not find any view with those GUIDs as an ID. (After running the same query on a known good VM, I found two views with corresponding GUIDs.)

 

They were for the the following views:

  • Friendly name: "Form Header - Full"
    System Name: com.K2.App.Framework.Core.ItemView.FormHeaderFull
  • Friendly name: "Form Footer"
    System Name: com.K2.App.Framework.Core.ItemView.FormFooter

 

On the environment showing errors, I did find views with the same system name, but their GUIDs were different. After "extracting" the P&D packages I found these views in the "App Framework Core.KSPX" package. The view ID was the exact same GUIDs that was found in the logs, and the exact same GUID that was found in the test environment.
The Apps Team confirmed that these are system views, and will always have the same GUIDs. P&D tried to deploy a couple of system packages and failed, because those views already existed but with different GUIDs.

Resolution

Run the following queries, to update the system names of the eronious views:

--

UPDATE [K2].[Form].[View] 
SET [Name] = 'com.K2.App.Framework.Core.ItemView.FormHeaderFull.Renamed'
WHERE [Name] = 'com.K2.App.Framework.Core.ItemView.FormHeaderFull'

 

UPDATE [K2].[Form].[View]
SET [Name] = 'com.K2.App.Framework.Core.ItemView.FormFooter.Renamed'
WHERE [Name] = 'com.K2.App.Framework.Core.ItemView.FormFooter'
 

Using P&D, deploy the packages found in the "C:Program Files (x86)K2Setup" folder, in the following order:

  1. Deploy "App Framework Core.kspx"
  2. Deploy "App Installer.kspx"
  3. Deploy "App Framework Extension Notification.kspx"
  4. Deploy "App Wizard.kspx"

 

After opening "Apps" in "Workspace" the error was gone, and the apps page functioned as expected.


0 replies

Be the first to reply!

Reply