Strange Error on fetching patient (Caused by: java.lang.IllegalArgumentException: MINUTE: 0 -> 15)

When getting some patients, especially on the old database, some patients come up with this error. This affects running patient flags, exporting data, and loading patient dashboards in the 2. x implementation.

What we have discovered so far We have noticed that this has to do with the patient birthdate when we update the patient’s birthdate with a date of 1937-01-01 this error is thrown java.lang.IllegalArgumentException: MINUTE: 0 -> 15 at java.base/java.util.Gre - Pastebin.com Is there anything special with the date 1937-01-01

@dkayiwa @ibacher

I’m not aware of any special issues around 1937-01-01. This seems like a bug either in the MySQL Connector/J or in the JDK itself. There are a few relevent bugs on the MySQL bug tracker, but none that seem to have a satisfactory resolution.

The nearest suggestions I can think of is to ensure you have the version of Java you’re using running the latest version of whatever release, as this may be similar to this case where the issue was out-of-date timezone data in the JDK itself.

1 Like

Did you ever resolve this issue? I am facing the same issue

@sthaiya are you facing this your self. It doesn’t have a definite solution at the moment.

Yeah am facing it myself. Thanks for the response

This might be coming from the fact that the date field of birthdate is being interpreted as datetime by hibernate. It does not happen to all patients but mostly to those 1937-01-01 for my case. Not sure what pattern you have on your end.

1 Like

Its failing for the same patients. Where birthdate = 1937-01-01

1 Like

Discussed today w/ Samuel and @dkayiwa: We strongly suggest that @slubwama & @sthaiya you try upgrading to the new Platform 2.7, as we strongly suspect that the Hibernate upgrades included there should solve this problem. But, if it doesn’t solve the problem, @dkayiwa would really like to know :slight_smile: Have a look at the instructions here for grabbing Platform 2.7: Announcing OpenMRS Platform 2.7.0 Release - #3 by wikumc

Thank you so much for this post - what a very interesting error!!!