2021年5月BUG记录板

2021年5月BUG记录板

1、错误信息:feign.FeignException$NotFound: status 404 reading …
日期:2021.5.14
Bug:调用openfeign远程接口失败,报404没有找到

解决:调用方微服务接口没有开放,对新加接口要放行

2、错误信息:org.springframework.http.converter.HttpMessageNotReadableException: Invaild JSON input: Cannot deserialize instate of ...
日期:2021.5.17
Bug:实体类反序列化失败

解决:Controller使用了两个RequestBody,删掉其中一个就可以
3、错误信息:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException
日期:2021.5.17
Bug:Error updating database. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__frch_item_0’. It was either not specified and/or could not be found for the javaType (cn.com.beijingipo.policy.match.entity.MatchItemOptionOrg) : jdbcType (null) combination.

解决:baseMapper.deleteBatchIds()应该传入id列表,但是传入了一个实体类列表,所以报错了
4、错误信息:org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing
日期:2021.5.17
Bug:public cn.com.beijingipo.framework.web.model.Response cn.com.beijingipo.policy.match.controller.MatchItemOptionController.query(cn.com.beijingipo.policy.match.dto.MatchItemOptionQueryDTO)

解决:写成@GetMapping了,改成@PostMapping
5. 错误信息:Error updating database. Cause: java.sql.SQLException: Field ‘id’ doesn’t have a default value
日期:2021.5.21
Bug:org.springframework.dao.DataIntegrityViolationException:

解决:navicate设置主键自增

6. 错误信息:java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
日期:2021.5.23
Bug:启动失败报错,说了一堆不相干的类bean对象初始化错误

解决:@RequestParam(“userName”)后面添加信息

7. 错误信息:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
日期:2021.5.24
Bug:启动不起来,The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server

解决:嗯等,数据库连接不上
8. 错误信息:java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class cn.com.beijingipo.system.facade.vo.SysAuthUserVO
日期:2021.5.25
Bug:java.util.LinkedHashMap is in module java.base of loader ‘bootstrap’; cn.com.beijingipo.system.facade.vo.SysAuthUserVO is in unnamed module of loader 'app’没有转成对象

解决:接完数据列表后遍历对列表中内容用json强转
List<SysAuthUserVO> facadeSysAuthUserVOList = (List<SysAuthUserVO>) iSystemFacadeService.getUserList(userName, cellPhone).getData();
  if (!facadeSysAuthUserVOList.isEmpty()){
      for (int i = 0; i < facadeSysAuthUserVOList.size(); i++){
          sysAuthUserVOList.add(JSON.parseObject(JSON.toJSONString(facadeSysAuthUserVOList.get(i)), SysAuthUserVO.class));
      }
  }
9. 错误信息: Field iMatchPolicyService in xxx required a single bean, but 11 were found
日期:2021.6.1
Bug:多个Bean对象,找不到注入哪个

解决:找一个添加@Primary注解

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值