Tag Archives: Some small problems

Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the

There is a problem when adding, deleting, modifying and querying the interface of a table, as shown in figure

  Error codes are as follows:

Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESCRIBE , CREATE_TIME,
    CREATED, UPDATE_TIME, UPDATED
   
    from renew_rul' at line 3
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESCRIBE , CREATE_TIME,
    CREATED, UPDATE_TIME, UPDATED
   
    from renew_rul' at line 3 

Prompt me that my SQL syntax is abnormal. I have searched the Internet for a long time, but I haven’t found a similar problem. I specially record it,

The database used is MySQL and the database graphical interface Navicat.

 

The reason for the problem is that description is a keyword, which needs further processing in mybatis, but it’s strange that status should also be a keyword. Why doesn’t it report an error?

Solution: change the description field to des so that it can be compiled.

org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deseria

org.springframework.http.converter.HttpMessageNotReadableException:
JSON parse error: Cannot deserialize value of type `java.util.Date` from String “NULL”: not a valid representation
(error: Failed to parse Date value ‘NULL’: Unparseable date: “NULL”);
nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String “NULL”: not a valid representation (error: Failed to parse Date value ‘NULL’: Unparseable date: “NULL”)
at [Source: (PushbackInputStream); line: 16, column: 14] (through reference chain: com.starsaiot.battery.entity.PledgeOrder[“payTime”])
=====================================================

I encountered this problem in a project where the front-end and back-end are separated
The front-end input data is “payTime”: “NULL”,
“tradeNum”: “null”,
“updateTime”: “2021-08-17 16:39:50”,
“updated”: “null”,
The console reports this error
====================================================
The reason for the error: the type of payTime is not correct, this capital NULL is the data I copied from the database and put in every too much attention, it should be consistent with the following null.