MyBatis报错

来源:互联网 发布:企业所得税申报软件 编辑:程序博客网 时间:2024/05/16 11:01
列举自己在学习MyBatis中遇到的错误,方便以后查看。
  1. org.apache.ibatis.exceptions.PersistenceException: 
    ### Error updating database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.jiujiujijin.dao.DonationrecordMapper.insertDonationrecord
    ### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for ...略   报该种错误原因可能有:一:对应的mapper.xml中sql语句出错。二:
    String Statement =" ..."中的内容拼写错误。
  2. org.apache.ibatis.exceptions.PersistenceException: 
    ### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to usenear 'check,()registerid)                                                                                                                      
    该错误是因为数据库中check字段冲突。更改了相应类的属性和在数据库中的字段名就解决了。

0 0
原创粉丝点击