JRockit 7.0, 8.1- Classloading problem: NoSuchMethodError

(Doc ID 774065.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle JRockit / JRockit / 7.0, 8.1
Information in this document applies to any platform

Goal

JRockit throws the following exception on a particular scenario whereas other JDKs work fine.

java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: callable

The code which causes the problem is something like this:
public void someMethod(String[] args){
	   DynamicClassLoader.appendToSearchPath("Security.jar");
	   int licenseAdded = AddLicenseSet.callable(args);
}

where,

'AddLicenseSet' is the class which is in 'Security.jar' file. This .jar file is added to the search classpath only at
method run time.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms