Code example for InvocationTargetException

Methods: getTargetException

0
				Method ejbMethod = ejb.getClass().getMethod(method.getName(), method.getParameterTypes());
				return ejbMethod.invoke(ejb, invocation.getArguments());
			} 
		} 
		catch (InvocationTargetException ex) {
			Throwable targetEx = ex.getTargetException();
			if (logger.isDebugEnabled()) { 
				logger.debug("Method of local EJB [" + getJndiName() + "] threw exception", targetEx);
			} 
			if (targetEx instanceof CreateException) {
				throw new EjbAccessException("Could not create local EJB [" + getJndiName() + "]", targetEx);
			} 
			else { 
				throw targetEx;
			} 
		} 
		catch (NamingException ex) {
			throw new EjbAccessException("Failed to locate local EJB [" + getJndiName() + "]", ex);
		} 
		catch (IllegalAccessException ex) {