Insert the expiration date into mysql. The error is:
Login exception is org.apache.ibatis . type.TypeException : Could not set parameters for mapping: ParameterMapping{property=’expired’, mode=IN, javaType=class java.util.Date , jdbcType=null, numericScale=null, resultMapId=’null’, jdbcTypeName=’null’, expression=’null’}. Cause: org.apache.ibatis . type.TypeException : Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException : Parameter index out of range (1 > number of parameters, which is 0).
I always thought that the MySQL insert date required format. After traversing various methods, I saw a blog and found that it was a problem with my own insert statement…
@Insert({"insert into ", TABLE_NAME, "(", INSERT_FIELDS,") values (#userId}, #{expired}, #{status}, #{ticket})" })
There is one missing userid{
Right for
@Insert({"insert into ", TABLE_NAME, "(", INSERT_FIELDS,") values (#{userId}, #{expired}, #{status}, #{ticket})" })
Taikeng, record it
Read More:
- Mybatis Integrate SQLSERER Null Value Error: Error setting null for parameter # with JdbcType OTHER
- Android Working Directory:NULL Environment:NULL Error
- [Solved] Error: Cannot run with sound null safety, because the following dependenciesdon‘t support null safe
- [Solved] Neo4j error: Cannot merge the following node because of null property value for ‘casualty’
- [Solved] Error: exception: java.lang.reflect.InvocationTargetException: null
- [Solved] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
- failed: RawInventory gets null OracleHomeInfo [How to Solve]
- [Solved] uview u-sticky Error: Cannot read property ‘bottom‘ of null
- openlayers — Cannot read property ‘slice‘ of null—Map cannot be loaded
- [Solved] Hystrix error: java.util.concurrent.TimeoutException: null
- How to Solve “Error db.num is null” when starting Nacos
- [Solved] Springboot Reflection calls ServiceImpl Error: java.lang.NullPointerException, mapper is null
- El-cascader error: Cannot read property’level’ of null
- [Solved] Unity Error: Got null handle from IDXGIResource::GetSharedHandle
- How to Solve null/hadoopbinary/wintils.exe Error
- Vue ElementUI el-dropdown Error: Uncaught TypeError: Cannot read property ‘disabled‘ of null
- Kafka configurate broker mapping error: discovered coordinator XXX rack: null
- [Solved] kettle Error: Unexpected problem reading shared objects from XML file: null
- [Solved] JOptionPane Error: java.awt.HeadlessException: null
- JPA @ManyToMany java.lang.StackOverflowError: null [How to Solve]