Java异常总结
记录项目开发过程中得各种异常
悲雨叹风
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Maven 报错 Process terminated
问题使用maven进行clean时,报错如下:解决查看详情错误意思时maven得setting.xml配置文件找不到。查看maven配置发现maven 配置文件setting.xml 地址填错了。重新选则重启项目就行了!原创 2021-08-10 21:46:25 · 806 阅读 · 0 评论 -
maven下载失败问题/maven配置问题
如果你在网上看遍所有的答案都没得到解决,请看下面设置:看看这个按钮有没有被点亮,被点亮的话,请取消掉!按钮意思:toggle offline mode翻译:切换脱机模式都脱机了怎么还能下载下来啊!!!...原创 2021-05-25 20:59:47 · 286 阅读 · 0 评论 -
Invalid bound statement (not found)总结
想必大家都遇见这个bug。常见问题1.没有扫描到mapper.xml映射文件。在配置文件中指定扫描包时,配置路径有问题。2.mapper.xml文件编写错误接口中方法名与xml文件中 id是否一致xml文件中的 namespace=“xxx.xxx.xxx.Mapper” 中的路径是否与接口文件路径一致3.神奇错误检查你是目录还是文件!!!第一个mapper.assets是目录。第二个是文件名。所以一直扫描不到!...原创 2021-03-08 14:39:19 · 131 阅读 · 0 评论 -
Unknown column ‘字段名‘ in ‘field list‘ 错误解决方案
解决方案1.检查实体类属性跟数据表字段名称是否一致2.检查数据表字段有没有空格或者回车3.检查数据库编码和数据表字段编码是否一致4.如果上述都不能解决那就检查数据库有没有用对!!!那就检查数据库有没有用对!!!那就检查数据库有没有用对!!!有没有切换数据源啊!本就是因为用了默认数据源,导致自己怀疑人生!...原创 2021-02-19 11:42:17 · 54642 阅读 · 15 评论 -
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
项目场景:springboot2.x+shiro+redis实现简单认证和授权demo问题描述:在ShiroConfig配置文件中新增配置: //数据来自配置文件application.yml @Value("${spring.redis.host}") private String host; @Value("${spring.redis.port}") private int port; @Value("${spring.redis.password}")原创 2021-01-19 15:23:33 · 410 阅读 · 0 评论 -
错误: 找不到或无法加载主类问题总结
错误: 找不到或无法加载主类问题总结简单说明运行的是普通的java项目(单module),非maven项目该项目是用来学习算法用的,前一天好好的,今天再编译,就出现问题。提示:错误: 找不到或无法加载主类解决办法一般这种问题是编译这块出现了问题。1.你可以选择清空之前的编译文件,再重新编译。maven项目可以在工程的生命周期(lifecycle)选择clean,清空编译文件。然后重新编译或者install。关于maven工程的生命周期这块,可以自行度娘了解。2.查看你的工程编译输出目录。具原创 2021-01-13 11:11:09 · 10100 阅读 · 2 评论 -
could not be authenticated by any configured realms. 。Please ensure that at least one realm问题
问题描述:shiro配置多realm时出现的问题。org.apache.shiro.authc.AuthenticationException: Authentication token of type [class com.finn.springboot002.common.config.shiro.JwtToken] could not be authenticated by any configured realms. Please ensure that at least one realm原创 2020-12-29 20:57:12 · 5259 阅读 · 2 评论 -
Spring 利用junit 测试@Service注解出现java.lang.NullPointerException异常解决
一、报错信息:二、简单介绍:1、bean.xml文件2、项目目录3、不使用注解测试测试结果:4、使用注解测试测试失败:三、原因分析:空指针异常,说明注入BookService bean对象失败。感觉不可能能啊,我得配置没问题得,进行了组件扫描,使用解析xml放松创建bean对象没问题,使用注解怎么就失败了。先百度一番。1、百度结果a、很多人说是,junit测试得时候,需要加@RunWith(SpringJUnit4ClassRunner.class)注解,既然大家都加了,原创 2020-09-21 22:07:04 · 2449 阅读 · 0 评论 -
Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method ‘dataSource‘ threw except
Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method ‘dataSource’ threw exception;bug分析实例化com.zaxxer.hikari.HikariDataSource这个类失败。我也没使用它啊,怎么会示例化呢?百思不得其解啊。后面说dataSource的异常,我就引入了jdbc啊,会不会是这个问题啊。查看引入依赖引入的是springboot配置好的支持JDBC数据库。点进去原创 2020-09-11 21:20:19 · 18651 阅读 · 2 评论 -
shiro异常:Exception: org.springframework.beans.factory.BeanCreationException
springboot整合shiro安全框架异常记录异常显示: [ERROR] - org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup (TomcatStarter.java:61) - Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: - Erro原创 2020-07-17 10:26:43 · 629 阅读 · 0 评论 -
Found binding in [jar:file:/C:/Users/P0128/.m2/repository/ch/qos/logback/logback-classic/1.2
SpringBoot slf4j依赖冲突问题SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/C:/Users/P0128/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Foun原创 2020-07-16 13:01:34 · 5804 阅读 · 3 评论 -
由GET http://localhost:8080/static/jquery.min.js net::ERR_ABORTED 404错误,引起的SpringBoot配置web静态资源路径问题
由GET http://localhost:8080/static/jquery.min.js net::ERR_ABORTED 404错误,引起的SpringBoot配置web静态资源路径问题最开始以为是jquery引入问题但是发现并非如此。检查页面发现,404资源未找到,不可能啊,我在html页面明明可以Ctrl加单机进入jQuery的啊。。。页面代码和项目结构:前端login.html,jquery引用:application.yml中关于spring.mvc以及spring.resou原创 2020-07-15 10:14:26 · 4805 阅读 · 1 评论 -
记录SpringBoot启动错误,Error creating bean with name ‘loginController‘: Unsatisfied dependency expressed
记录SpringBoot启动错误,Error creating bean with name ‘loginController’: Unsatisfied dependency expressed最开始以为业务类没加@Service注解,结果不是这个原因。我也不知道自己为什么会突然想到是不是UserMapping.xml文件错误结果还真是,原文件:同时出现了resultType和resultMap;就这么简单,不能同时出现resultType和resultMap,具体原因还在百度中。。。找到原因原创 2020-07-14 16:42:25 · 17405 阅读 · 4 评论
分享