I am using a java struct & array to save a list of objects to database. I pass an array of structs to a stored procedure. Then using a the insert scripts in the procedure, the data is saved to the appropriate database table. A database side TYPE object & table of this type has been created to handle this data in the stored procedure.
The issue is that while Integer & date values are inserted to the DB properly, String data is saved as NULL. I am sure that the Sting fields do have data.
I checked my struct object after insert one record into it. It shows the data type as CHAR instead of string/varchar and the data is show as "???" .
I read on some forums that this could be a jar related issue.
My tech stack is this : ojdbc6.jar , oracle 12c , java8.
You wrote that you have the 12c database, but you have not written if it is 12.1 or 12.2.
Since you have JDK 8, then:
- if you have database 12.1, it is recommended that you have at least ojdbc7.jar
- if you have database 12.2, it is recommended that you have at least ojdbc8.jar.
"What are the Oracle JDBC releases Vs JDK versions?"