Code example for InvocationTargetException

Methods: getCause

0
					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);
			list.clear();
			return loader;
		}