Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

oracle Array filled with null data in java

When I try to throw an Array of strings to oracle stored procedure as:

String arrStr[] ={"val1","val2","val3"};
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("STR_ARRAY", connection );

oracle.sql.ARRAY oracleArray = new oracle.sql.ARRAY(descriptor, connection, arrStr);

oracleArray holds null data , oracleArray.datumArray = {???,???,???}

like image 250
mega Avatar asked Dec 21 '22 09:12

mega


1 Answers

In my case (see my comment above), it was caused by encoding problem, however - without any exception or debug information. Including orai18n.jar to the project libraries solved this... it is really sad, there is no exception or something that would indicate how to solve the problem

like image 54
tomas Avatar answered Dec 22 '22 21:12

tomas