Cybersecurity
DevOps Cloud
IT Operations Cloud
This article provides information about "java.lang.IllegalStateException: Not a JSON Object: null" error when sync items from Rally
MF Connect 24.2 and lowers.
Situation
When sync items from Rally, it's failed with error:
ERROR (XXX) [IterationReporter(reportActionFailed:246)] failure dataPool={"DataPool":{"Product":{"name":"Rally","displayName":"Rally"},"SyncName":"XXX","isTemporaryForMeta":false,"isSourceDataPool":false,"ProjectName":"XXX","TypeName":"HierarchicalRequirement"}}, projectMapGuid=XXX, action=OnStartSyncadditionalInfo=onStartSync failed for dp=XXX, with err=java.lang.IllegalStateException: Not a JSON Object: null
com.connect.api.exceptions.BCException: java.lang.IllegalStateException: Not a JSON Object: null
In TRACE log level, below error found:
DEBUG (XXX) [RallyRestApiManager(performQuery:90)] Got response:{"QueryResult": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "Errors": [], "Warnings": ["It is no longer necessary to append \".js\" to WSAPI resources."], "TotalResultCount": XXX, "StartIndex": 1, "PageSize": 2000, "Results": [{"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "_ref":
....
<data>
....
DEBUG (XXX) [RallyRestApiManager(putApi:270)] Storing rallyRestApi.
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:379)] registeredTypes:[PortfolioItem/Feature, PortfolioItem/FeatureSet, HierarchicalRequirement]
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:413)] Ignoring deleted FlowState id: XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:413)] Ignoring deleted PortfolioItem/Capability id: XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:413)] Ignoring deleted PortfolioItem/Capability id: XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:413)] Ignoring deleted FlowState id: XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:426)] deletedItem:DeletedItem [id=F2, type=PortfolioItem/Feature, deletedBy=XXX, deletionDate=XXX, ref=https://XXX/slm/webservice/v2.0/recyclebinentry/XXX]
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:426)] deletedItem:DeletedItem [id=XX, type=PortfolioItem/Feature, deletedBy=XXX, deletionDate=XXX, ref=https://XXX/slm/webservice/v2.0/recyclebinentry/XXX]
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:413)] Ignoring deleted FlowState id: XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:413)] Ignoring deleted PortfolioItem/Initiative id: XXX
TRACE (XXX) [DeletedItemManager(updateCacheWithQueryResponse:395)] deletionDateStr:XXX
ERROR (XXX) [DeletedItemManager(updateCacheWithQueryResponse:435)] Not a JSON Object: null
java.lang.IllegalStateException: Not a JSON Object: null
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91) ~[gson-2.8.9.jar:?]
MF Connect should return a JsonObject when it fetches "DeletedBy" property from deleted item. But, there is an exception when accessing the property as jonsObject because Rally did not assign a value for it (NULL). It's a known problem with MF Connect