Example usage for java.lang.reflect InvocationTargetException getMessage

List of usage examples for java.lang.reflect InvocationTargetException getMessage

Introduction

In this page you can find the example usage for java.lang.reflect InvocationTargetException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:org.wso2.carbon.analytics.spark.core.udf.adaptor.UDF11Adaptor.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) throws Exception {
    Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes);
    try {/* w  w  w  . j a va 2  s  .  c o  m*/
        if (Modifier.isStatic(udfMethod.getModifiers())) {
            return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11);
        } else {
            Object udfInstance = udfClass.newInstance();
            return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11);
        }
    } 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.UDF12Adaptor.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) throws Exception {
    Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes);
    try {//from  w  w  w .  java  2 s .com
        if (Modifier.isStatic(udfMethod.getModifiers())) {
            return udfMethod.invoke(null, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12);
        } else {
            Object udfInstance = udfClass.newInstance();
            return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12);
        }
    } 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.UDF13Adaptor.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) throws Exception {
    Method udfMethod = udfClass.getDeclaredMethod(udfMethodName, parameterTypes);
    try {/*ww w.  j  ava  2 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);
        } else {
            Object udfInstance = udfClass.newInstance();
            return udfMethod.invoke(udfInstance, o, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13);
        }
    } 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.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 {//from w ww . jav  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);
        } 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   ww w. j a va 2s.  c  om
        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  a  va 2s .  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 w  w 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);
        } 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 {/*w  ww.  jav  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);
        } 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 w w .  j  a  v  a2s. 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);
        } 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.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 a  va 2  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);
        } 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());
    }
}