Code example for InvocationTargetException

Methods: getCause

					new Class<?>[] { this.wsPreProcessorClass }, adapter);
			this.addPreDefinePlugin.invoke(this.classLoader, adapterInstance);
		catch (InvocationTargetException ex) {
			throw new IllegalStateException("WebSphere addPreDefinePlugin method threw exception", ex.getCause());
		catch (Exception ex) {
			throw new IllegalStateException("Could not invoke WebSphere addPreDefinePlugin method", ex);
	public ClassLoader getThrowawayClassLoader() {
		try { 
			ClassLoader loader = cloneConstructor.newInstance(getClassLoader());
			// clear out the transformers (copied as well) 
			List<?> list = (List<?>) transformerList.get(loader);
			return loader;
Connect your IDE to all the code out there  Get Codota for Java