Issue:
While trying to change asset state from list view, we get "Sorry an error has occurred". If we try to Edit that asset, we get a blank page.
Error traces from logs:
|[com.adventnet.servicedesk.asset.action.AssetDefAction]|[SEVERE]|[102]: Exception while trying to retrieve data for Asset : 744955|
java.lang.NullPointerException
at com.adventnet.servicedesk.utils.Select2Util.constructJSONData(Select2Util.java:78)
at com.adventnet.servicedesk.asset.action.MSPAssetDefAction.fillDetails(MSPAssetDefAction.java:75)
at com.adventnet.servicedesk.asset.action.AssetDefAction.execute(AssetDefAction.java:796)
at com.adventnet.servicedesk.asset.action.MSPAssetDefAction.execute(MSPAssetDefAction.java:39)
Cause:
Issue is because those assets which has this issue does not have department assigned to it properly.
Fix:
Navigate to Assets list view->Select all the assets that has this issue->Actions-> Modify State->Assign to Department->Select the Account and Department and save.
If there are more number of assets in trouble, you can use this below query to find out the same,
select r.resourcename,r.ciid,ro.deptid,dd.deptname,dd.siteid from resources r inner join resourceowner ro on r.resourceid=ro.resourceid inner join departmentdefinition dd on ro.deptid=dd.deptid where dd.siteid is null