nulljava.lang.IllegalArgumentException for a date field having default value null

I have a table that contains a date field (end_date) that the default value is null.

enter image description here

I have created a stored procedure to insert data to this table.

CREATE PROCEDURE `insert_illness_mapping`(IN `onset_dt` DATE, IN `end_dt` DATE, IN `c_id` INT(11))
    NO SQL
INSERT INTO illness_mapping (`onset_date`, `end_date`, `coding_id`, ) VALUES (onset_dt, end_dt, c_id)

When I call the stored-procedure from phpmyadmin without filling a value for the end_date filled, it’s working properly.

When I trying to call the stored-procedure within my java rest-api I get:

    at java.sql.Date.valueOf(Unknown Source)

When I’m getting the value of the date from the json file, I get it as a string and then I’m converting it to date. May be this is the issue.

This is an example of the json string:


Do you have any idea?