Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

calling dotnet method using tdotnetrow that takes array as input

Hi,
I am trying to call a dotnet dll method, using tdotnetrow component, that takes a string array as an input parameter. But I am getting error something like "<method1> is called with invalid parameters". Do you know if its possible to call a method that takes an array as input parameter?
Thanks,
Mukesh
Labels (2)
3 Replies
Anonymous
Not applicable

Hi,
I am getting error something like "<method1> is called with invalid parameters"

Error message is unfortunately too short to provide any answer. More job screenshots will be appreciated.
I provide you with component tdotnetrow reference to help you understand tdotnetrow better.
https://help.talend.com/search/all?query=tDotNETRow&content-lang=en
Best regards
Sabrina
Anonymous
Not applicable

This is the method signature:
public static void Main(String[] args)
{
Console.Out.WriteLine("Mapping Application");
}
If I pass just one parameter then I am getting following error:
-------------------------------------------------------------------------------------
System.ArgumentException: Object of type 'System.String' cannot be converted to type 'System.String[]'.
at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Java_org_talend_net_Object_invokeStaticGenericNative(JNIEnv_* env, _jclass* _this, _jobject* jAssembly, _jstring* className, _jstring* methodName, _jobjectArray* jParams, _jobjectArray* types, _jobject* nHelper)
------------------------------------------------------------------------------------------------------
If I pass multiple parameter clicking "+" sign then I am getting following error:
-------------------------------------------------------------------------------------------------------------
System.InvalidOperationException: arguments list for call: Main doesn't provide correct number of parameters
at Java_org_talend_net_Object_invokeStaticGenericNative(JNIEnv_* env, _jclass* _this, _jobject* jAssembly, _jstring* className, _jstring* methodName, _jobjectArray* jParams, _jobjectArray* types, _jobject* nHelper)
-------------------------------------------------------------------------------------------------------------
Thanks,
Mukesh
Anonymous
Not applicable

Hi Mukesh
The method requires only one input parameter and that should be a string array in your case. You can define the input parameter like:
new String[]{input_row.column1}

//column1 is a column name with string type.
In the mean time, i suggest you to read the user manual to know more about this component.:
https://help.talend.com/search/all?query=tDotNETRow&content-lang=en
Shong
0683p000009MD7Y.png