[DF-5228] Jni errors handling for GetMethod and GetClass. Calls optimisation.