Class: JsonUtil not found in namespace

Which IIQ version are you inquiring about?

8.4p3

Please share any images or screenshots, if relevant.

[Please insert images here, otherwise delete this section]

Please share any other relevant files that may be required (for example, logs).

Error:

Exception during aggregation. Reason: java.lang.RuntimeException: java.lang.RuntimeException: sailpoint.connector.ConnectorException: Error: BeanShell script error: bsh.EvalError: Sourced file: inline evaluation of: ``import java.io.*; import java.util.Map; import java.util.HashMap; impor . . . '' : Typed variable declaration : Class: JsonUtil not found in namespace : at Line: 32 : in file: inline evaluation of: ``import java.io.*; import java.util.Map; import java.util.HashMap; impor . . . '' : JsonUtil BSF info: Rule-App1-AccountAggregationGrn-AfterOperation-ReadJSONFile at line: 0 column: 
columnNo

Rule:

import java.io.*;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import connector.common.JsonUtil;
import sailpoint.tools.GeneralException;

// read a json file on the Task server into a StringBuilder and extract into a List

JsonUtil jsonUtil = new JsonUtil();
List users = jsonUtil.parse(fileContents);

// put users into a Map and return the rule

in tomcat/webapps/ROOT/WEB-INF/lib, I have:

  • json.jar
  • json-path-2.7.0.jar
  • json-path-2.9.0.jar
  • json-smart-2.4.8.jar
  • json-smart-2.4.10.jar

Share all details about your problem, including any error messages you may have received.

Hi everyone. I receive this error whenever I run an account aggregation that calls an after operation rule that uses JsonUtil to parse a json file. JsonUtil should be an IIQ provided class in connector.common. How do I check if this class is present and how do I resolve this error? Thank you.

Hi @tim089

Please confirm the exact name of your IdentityIQ deployment folder.

We typically deploy the application outside of the ROOT directory. I need to know if the path is ../webapps/identityiq/WEB-INF/lib or ../webapps/ROOT/WEB-INF/lib for correct file placement.

Hi @pattabhi

We do not have a ../webapps/identityiq folder. The only folder in ../webapps is ROOT.

Hi @tim089

Thanks for the quick reply.

I am not sure about exact issue, but I observe the 2 versions of the jar files, so keep latest version then try restaring the application server then check.

delete(or move out from lib folder to backup folder) following jar files.

  • json-path-2.7.0.jar
  • json-smart-2.4.8.jar

further I check doc/javadoc observe that parse has been Deprecated.

Hi @tim089,

try to use:

import sailpoint.integration.JsonUtil;

Thanks all. This fixed the error. For future reference, is there a version changelog that mentions package deprecations so that this can be avoided in the future?

1 Like

Hi Tim

I will suggest you to use gson or some other json library. This sometimes is changed by Sailpoint even though this class is still available but its restricted to be used only in connectors.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.