List of usage examples for java.lang.reflect InvocationTargetException getCause
public Throwable getCause()
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF14Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {//w w w . j a v a2s. c om if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF7Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {/*from w w w . ja v a 2s .co m*/ if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF8Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {/*w w w . j av a2s .c o m*/ if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF9Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8, Object o9) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {/*from ww w .ja v a2 s . c o m*/ if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF15Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {/*from w ww . j a v a 2s . c om*/ if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF16Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, Object o16) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {//w ww .j a v a2 s . co m if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.module.mgt.service.ModuleAdminMessageReceiver.java
protected void handleInvocationTargetException(InvocationTargetException e, Method method) throws AxisFault { String msg = null;//from www.j a v a2 s . c o m Throwable cause = e.getCause(); if (cause != null) { msg = cause.getMessage(); } if (msg == null) { msg = "Exception occurred while trying to invoke service method " + (method != null ? method.getName() : "null"); } if (cause instanceof ModuleMgtException) { log.debug(msg, cause); AxisFault axisFault = new AxisFault(msg, e); axisFault.setDetail(getExceptionDetails((ModuleMgtException) cause)); throw axisFault; } else if (cause instanceof AxisFault) { log.debug(msg, cause); throw (AxisFault) cause; } log.error(msg, e); throw new AxisFault(msg, e); }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF17Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, Object o16, Object o17) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {//from w w w . j av a2 s . com if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF18Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, Object o16, Object o17, Object o18) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {//from www. j a v a 2 s. co m if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }
From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF19Adaptor.java
@Override public Object call(Object o, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7, Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, Object o16, Object o17, Object o18, Object o19) throws Exception { Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes); try {/*from ww w .j a v a2 s . c o m*/ if (Modifier.isStatic(udfMethod.getModifiers())) { return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19); } else { Object udfInstance = udfClass.newInstance(); return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19); } } catch (InvocationTargetException e) { log.error("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); throw new Exception("Error while invoking method: " + udfMethodName + ", " + e.getMessage(), e.getCause()); } }