![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
常见的异常
伊柒丶
这个作者很懒,什么都没留下…
展开
-
org.junit.runners.model.InvalidTestClassError: Invalid test class
使用Junit4进行测试出现异常:org.junit.runners.model.InvalidTestClassError: Invalid test class ‘com.ayr.community.MailTest’:No runnable methods查看添加注解是否正确Junit4的@Test注解是 org.junit.Test;查看方法是否正确添加了注解...原创 2021-05-22 20:13:39 · 1607 阅读 · 0 评论 -
Mybatis There is no getter for property named in class java.lang.Integer
错误信息org.mybatis.spring.MyBatisSystemException: nested exception isorg.apache.ibatis.reflection.ReflectionException: There is no getterfor property named ‘userId’ in ‘class java.lang.Integer’使用select代码块中如果只传入了一个参数,并且这个参数用在了if标签中,则必须使用@Param注解Mapper接口原创 2021-05-17 15:18:01 · 464 阅读 · 0 评论 -
JavaWeb的错误总结 java.lang.IllegalStateException
JavaWeb的错误总结java.lang.IllegalStateException: 提交响应后无法调用sendRedirect()。该错误出现的原因是,在一段代码中,重复的多次执行sendDirect()所导致的。解决办法:找出代码块中,重复执行的位置进行修改。见错误代码if (res == -1 ){ response.sendRedirect(request.getContextPath() + "/BalanceNotEnough.jsp");}if (res == 2 ){原创 2021-02-05 20:46:45 · 5744 阅读 · 3 评论