![](https://img-blog.csdnimg.cn/20200425220825881.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
Bug日记
记录开发过程中的一些bug!
努力学习的小木白
开始程序员的生活......
展开
-
Bug0007 Cause: java.lang.UnsupportedOperationException
【原因】:mybatis对应mapper文件中的 resultType 与 Dao类中声明的方法返回类型不一致。【解决方法】:保证mapper文件中的resultType 和Dao类中声明的方法返回类型一致。例如Dao的方法定义为:List<Map<String,Object>> getListById(String id);如果mapper中的映射为<select id="getListById" parameterType="String" res.原创 2020-08-20 11:46:31 · 282 阅读 · 0 评论 -
Bug0006 mybatis 出现 NullPointExcepption报错
【原因】:可能是方法没被实例化【解决方法】:检查在对应ServiceImpl类中是否注入Dao,如果没注入,加上@Autowire注解,以及对应的Dao。原创 2020-08-20 11:22:07 · 213 阅读 · 0 评论 -
Bug0005 mybatis java.sql.SQLException: 无效的列类型
【报错信息】:java.sql.SQLException: 无效的列类型【原因】:相关mybatis文件中对应语句中的字段有空值【解决方法】:对可能为空值的字段加非空校验,或者在该字段的参数表达式中加上jdbcType。例如:<select id="getList" parameterType="String" resultMap="Person"> SELECT name, age from Person where id = #{id}</select&g原创 2020-08-20 11:14:13 · 306 阅读 · 0 评论 -
Bug0004 Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException
【报错信息】:Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'id' in where clause is ambiguous【原因】:对应的mapper.xml文件中字段“id”未指明表名【如何修复】:我遇到这种情况的原因是xml对应的语句为两表关联查查询,所以必须指名是那张表的“id”,例如"a.id"。...原创 2020-05-23 17:08:09 · 720 阅读 · 0 评论 -
Bug0003 org.mybatis.spring.MyBatisSystemException
【报错信息】:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'XXX' not found. Available parameters are [arg1, arg0, param1, param2]at...原创 2020-04-25 22:17:38 · 165 阅读 · 0 评论 -
Bug0002 IMP-00007: must be a DBA to import objects to another user's account
【问题】:IMP-00007: must be a DBA to import objects to another user's account【原因】:导入dmp文件时,imp命令的用户没有dba权限。【如何修复】:sys用户赋dba权限给导入的用户,语句:grant dba to 用户名。...原创 2020-04-25 22:14:45 · 1036 阅读 · 0 评论 -
Bug0001 redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource
【报错信息】:Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the poolat redis.clients.util.Pool.getResource(Pool.java:53)at redis.clients.jedis.JedisP...原创 2020-04-25 22:12:21 · 186 阅读 · 0 评论