I have created a context variable called srcCols of type Object
I am assigning a string array to the context variable using this code. The following assignment is done in tJava component
String[] cols = { "This","is","test" };
context.SrcCols = cols;
I am accessing the context variable in tJavaRow using the following code.
String[] Cols = (String[])context.SrcCols;
but when i run the job i get the following error.
java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String
What will be the solution for this problem
PS: This job is a Talend Bigdata Spark Job.