This is what i am struggling which class file is missing. I check in the entire system and unable to find class as mediatype. Please help as how to find the class file
Then it seems to be conflicting with another class with same name for example “javax.ws.rs.core.MediaType;”. You can try to call your class using the full package name so that it does not confuse it with another class.
It looks like the issue isn’t just about the import but about which MediaType class is actually available in IdentityIQ.
There are two common MediaType classes you may be running into:
javax.ws.rs.core.MediaType → included with JAX-RS and usually available in IIQ.
com.squareup.okhttp.MediaType / okhttp3.MediaType → part of the OkHttp client library, which is not bundled with IIQ unless you explicitly add the JARs under WEB-INF/lib.
If you’ve already tried import com.squareup.okhttp.MediaType; but the JAR isn’t on your IIQ classpath, it will fail. That’s why you can’t find the class file in your system.
If you are making REST calls from workflows or rules, use javax.ws.rs.core.MediaType instead, since it’s already present. Example:
If you specifically need OkHttp, then you’ll have to add the appropriate OkHttp JAR (which provides okhttp3.MediaType) into IIQ’s WEB-INF/lib directory and reference it directly.