Error, something went wrong. Contact administrator exception when viewing Insight Objects

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible


Summary

You may be getting an "Error, something went wrong. Contact administrator" pop up error message when viewing an Object in Insight:


The following appears in the atlassian-jira.log


2022-10-25 06:46:37,429+0000 http-nio-8080-exec-84 ERROR admin 406x518574x1 i41dh 0.0.0.0.,0.0.0.0 /rest/insight/1.0/object/6 [c.r.j.p.i.c.w.a.r.exception.mapper.DefaultMapper] Unexpected exception was thrown while processing the request
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.util.Date
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.assembleObjectAttributeValueEntry(ObjectAssembler.java:704)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.lambda$assembleObjectAttributeValueEntries$7(ObjectAssembler.java:623)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1082)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.assembleObjectAttributeValueEntries(ObjectAssembler.java:621)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.assembleObjectAttributeEntry(ObjectAssembler.java:549)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.lambda$assembleObjectEntry$5(ObjectAssembler.java:493)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1082)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.assembleObjectEntry(ObjectAssembler.java:486)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.assembleObjectEntry(ObjectAssembler.java:219)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectAssembler.assembleObjectEntry(ObjectAssembler.java:210)
	at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.object.ObjectResource.loadObject(ObjectResource.java:381)
	... 2 filtered



Environment

  • Any Insight version

  • Microsoft SQL Server as Jira database

Diagnosis

  1. Verify whether there is an inconsistency with the Objects attributes values in the database. Replace ? for one of the Object Ids affected. 
    1. Object Id can be seen in the error message in the atlassian-jira.log file. In this case Object ID is 6 (/rest/insight/1.0/object/6)
    2. Object Id can also be found on the URL: &objectId=6

      SELECT 
             O.NAME OBJECT_NAME,
             O.OBJECT_TYPE_ID,
             OTA.NAME OTA_NAME,
             OA.ID OA_ID,
             OA.OBJECT_TYPE_ATTRIBUTE_ID,
             OA.OBJECT_ID,
             OAV.ID OAV_ID,
       OAV.BOOLEAN_VALUE,
       OAV.*
      FROM AO_8542F1_IFJ_OBJ O
               LEFT OUTER JOIN AO_8542F1_IFJ_OBJ_ATTR OA ON O.ID = OA.OBJECT_ID
               LEFT OUTER JOIN AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA ON OTA.ID = OA.OBJECT_TYPE_ATTRIBUTE_ID
               LEFT OUTER JOIN AO_8542F1_IFJ_OBJ_ATTR_VAL OAV ON OA.ID = OAV.OBJECT_ATTRIBUTE_ID
      WHERE O.ID  = ?
  2.  BOOLEAN_VALUE column is set to 0 for Object Type attributes Key, Created or Updated instead of null.



Cause

This would point to AO_8542F1_IFJ_OBJ_ATTR_VAL table as it contains the attribute values. BOOLEAN_VALUE = 0 is not valid for attributes values other than boolean.
Key, Created or Updated attributes cannot be boolean and they should be set to null.

This situation was seen when Insight data is migrated via database replication or using any sort of 3rd party tool for migrating the Insight data.

Solution

Review the method used for Insight data migration and ensure that BOOLEAN_VALUE column values within AO_8542F1_IFJ_OBJ_ATTR_VAL table change do not change from from null to '0'




Last modified on Oct 25, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.