Found not to check all the fields can be queried, the last field to try, found that there is a problem in passwd_time this field, and then see this time is not valid time, changed to a valid time. RELATED links: MySQL time ' 0000-00-00 ' exception resolution in the Spring+mybatis project, query MySQL database encountered a problem: Java.sql.SQLException:Value ' 0000-00-00 ' can not Be represented as java.sql.Date analysis look at the reason, should be mybatis the Date Type field to String type, encountered date Type field ' 0000-00-00 ', cannot convert, So throw the exception to check the information on the Internet: MySQL database date, timestamp and other time types default to ' 0000-00-00 ' solution 1: Database connection URL Add parameter zerodatetimebehavior= Converttonull or round, can be said that the default ' 0000-00-00 ' conversion to other values; I also encountered a problem before: in DB2, the default value of the event type is ' 1900-00-00 ', but it has been an error in MySQL, The default value of the time type that was found to be MySQL by query must start with ' 1970-00-00 '. In addition, when the MySQL time type definition is not indicated as NULL, the default is not NULL, resulting in a default value of ' 0000-00-00 '. So there are two solutions to the problem: Solution 2: Give the default value when defining the time type, for example, date not null default ' 1970-00-00 '; solution 3: Define the time type defaults to NULL, for example, date null; Note: The official website gives the default value of the timestamp type to "1970-01-01 00:00:01 ' UTC to ' 2038-01-19 03:14:07 ' UTC in China due to the time zone problem for 1970-01-01 08:00:01 to 2038-01-19 11:14:07
Extracted SQL State class ' S1 ' from value ' S1009 '