mardi 26 juin 2018

spring boot test h2 data.sql wrong locale date format

I have a spring boot app with the file data.sql containing these DML commands:

insert into example (id, created) values (1, to_date('01-JAN-18', 'DD-MON-RR'));

insert into example (id, created) values (2, to_date('01-JAN-18', 'DD-MON-RR'));

Spring boot tests will fail after loading of spring context because of following error:

Function "TO_DATE": Invalid date format: " Tried to parse one of '[dÚc., juin, mai, fÚvr., mars, ao¹t, nov., janv., avr., juil., sept., oct.]' but failed

This problem was caused after I upgraded spring-boot but previously it worked correctly in version 2.0 ie. there in h2 was used default locale date as english (01-JAN-18), not germany.

Where can be the root problem?

Aucun commentaire:

Enregistrer un commentaire