how to call java function of jar file in javascript in kettle

Xionkana

New Member
I am new to Pentaho spoon tool and I want to call a Java function from jar (added to lib folder of kettle) into a transformation before mapping.I tried searching on Google, on Pentaho, as well as here on StackOverflow but of no use.I used Javascript before mapping in between i/p and o/p table in which I called the function from jar as \[code\]packagename.class_name.function()\[/code\] and passed one i/p field as I want from i/p table fields.When I clicked "test script" it gives me an error as follows:\[code\]org.pentaho.di.core.exception.KettleException: General error executing script:TypeError: Cannot call property convertIsciiToUnicode in object [JavaPackage]. It is not a function, it is "object". (script#4)\[/code\]Please let me know what I am doing wrong?Can anybody provide me an example for what I want to do?
 
Top