1 Reply Latest reply on Jun 19, 2019 6:32 PM by Zlatko Sirotic

    Java String saved as null in database when using a stored procedure.

    bhavikm

      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.

       

      Please advice.

       

       

      Regards,

      Bhavik