MySQL Forums
Forum List  »  Stored Procedures

Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question MySqlUdfJavaLauncher display InvocationTargetException
Posted by: Ashish Arora
Date: November 05, 2016 01:46PM

I use MySqlUdfJavaLauncher for not make polling to db, for send notification to an android app when db change this is my config: C:\Program Files (x86)\MySQL\MySQL Server 5.6\lib\plugin

mysqljavatrigger.jar

MySQLUDFJavaLauncher.dll

utils4j-0.7.0.jar

compile with javac -cp "path/to/jar" foo.java and add foo.class and json.jar in dir of mysql plugins, when i run select call_java_method('Test', 'myMethod("anString")'); in workbench have this error:

InvocationTargetException: java.lang.reflect.InvocationTargetException, message: null, localized message: null
import org.json.JSONObject;

public class Test {
public static String myMethod(String message) {
int a=1;
int b=2;
int c=a+b;
org.json.JSONObject jsonObj = new org.json.JSONObject("{\"phonetype\":\"N95\",\"cat\":\"WP\"}");

return "successfully invoked myMethod. Message: " + message + c + jsonObj;

Options: ReplyQuote


Subject
Views
Written By
Posted
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question MySqlUdfJavaLauncher display InvocationTargetException
5105
November 05, 2016 01:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.