Wed Aug 15, 2018 3:07 pm
Login Register Lost Password? Contact Us


IMPORT Java

Comments and questions related to the Enterprise Control Language

Mon Oct 23, 2017 7:48 pm Change Time Zone

Team,

I am Trying to register a new Java User defined function in /opt/HPCCSystems/classes
and access the same in the IMPORT java ECL Code. It couldn't run since the error 'Type mismatch on result'

Below is my code. Could you please let me know what am I missing here.

IMPORT java;
STRING jadd(integer a, integer b) := IMPORT(java, 'JavaAdd.add:(II)I'
: classpath('/opt/HPCCSystems/classes/'));
jadd(1,2);


This signature , I took from the below stuff

hpccdemo@HPCCSystemsVM-amd64-6:/opt/HPCCSystems/classes$ javap -s JavaAdd
Compiled from "JavaAdd.java"
public class JavaAdd {
public JavaAdd();
Signature: ()V

public static int add(int, int);
Signature: (II)I
}


Error: System error: 0: javaembed: Type mismatch on result (0, 0), 0,
Last edited by ravishankar on Tue Oct 24, 2017 1:05 pm, edited 1 time in total.
ravishankar
 
Posts: 14
Joined: Wed Mar 18, 2015 5:24 am

Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest