Code example for InvocationTargetException

Methods: getTargetException

0
			Method getUserTransactionMethod = this.transactionHelper.getClass().getMethod("getUserTransaction");
			return (UserTransaction) getUserTransactionMethod.invoke(this.transactionHelper);
		} 
		catch (InvocationTargetException ex) {
			throw new TransactionSystemException( 
					"WebLogic's TransactionHelper.getUserTransaction() method failed", ex.getTargetException());
		} 
		catch (Exception ex) {
			throw new TransactionSystemException( 
					"Could not invoke WebLogic's TransactionHelper.getUserTransaction() method", ex);
		} 
	} 
 
	@Override 
	protected TransactionManager retrieveTransactionManager() throws TransactionSystemException { 
		loadWebLogicTransactionHelper(); 
		try { 
			logger.debug("Retrieving JTA TransactionManager from WebLogic TransactionHelper"); 
			Method getTransactionManagerMethod = this.transactionHelper.getClass().getMethod("getTransactionManager");
			return (TransactionManager) getTransactionManagerMethod.invoke(this.transactionHelper);
Contextual code suggestions in your IDE  Get Codota for Java