其他分享
首页 > 其他分享> > 2021年5月BUG记录板

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注解

标签:2021.5,cn,错误信息,BUG,记录板,2021,java,com,Bug
来源: https://blog.csdn.net/weixin_40003021/article/details/117571815