
常见错误及解决办法
失业找工作中
it小白的学习笔记,加油!
展开
-
EXPIRE key -1导致key被删除问题
key在指定的秒数之后过期。当seconds参数设置为-1时,这实际上是一个旧的用法,意味着取消key的过期时间,使其变为永久有效。PERSIST key命令移除给定key的过期时间,如果这个key存在并且有一个过期时间,那么PERSIST命令返回1。在Redis中,如果你想要设置一个键(key)为永不过期,你应该使用PERSIST命令,而不是EXPIRE命令配合-1参数。因此,为了确保代码的清晰性和与Redis版本的兼容性,当你想让一个key永不过期时,最好使用PERSIST命令。原创 2024-03-22 14:57:34 · 506 阅读 · 0 评论 -
Guava Cache、Caffeine Cache引用传递的坑
使用对象时,改动对象,缓存中的数据也会改变。原创 2024-02-01 11:44:41 · 285 阅读 · 0 评论 -
Spring6.0源码 SpringMVC注解版环境搭建时不加载WebApplicationInitializer情况
【代码】Spring6.0源码 SpringMVC注解版环境搭建时不加载WebApplicationInitializer情况。原创 2024-01-24 16:20:52 · 481 阅读 · 0 评论 -
Linux虚拟机(lvm)报Unmount and run xfs_repair
linux系统没有正常关机,今天启动虚拟机无法进入系统,提示metadata corruption deleted at xxxx;Unmount and run xfs_repair原创 2023-07-27 22:38:27 · 1354 阅读 · 0 评论 -
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
Druid 1.0.20版本之后,开始支持配置connectTimeout和socketTimeout。在1.0.20版本之前,Druid默认使用Java底层的连接超时和读取超时参数。如果不配置 connect-timeout 和 socket-timeout 参数,则默认启用 Druid 的默认超时时间。默认情况下,连接超时时间为 1000 毫秒,读取超时时间为 30 分钟。如果需要更改超时时间,可以配置 connect-timeout 和 socket-timeout 参数来覆盖默认值。一般来说,建原创 2023-07-25 10:42:49 · 1260 阅读 · 0 评论 -
seata无限失败重试Failed to retry rollbacking Unknown java.lang.RuntimeException: rm client is not connect
在多数据源分布式事务下,如果应用在事务执行过程中被强制重启,还没有来得及完成事务提交或回滚操作时,可能会导致一些数据没有正确的提交或回滚,从而出现数据不一致的情况。这种情况下,可能会在/bin/sessionStore/root.data文件中留下一些回滚数据。为了避免这种情况的发生,应尽可能避免强制重启应用,同时在设计应用时,要充分考虑多数据源分布式事务的一致性和可靠性,采用合适的解决方案来保证分布式事务的正确执行。原创 2023-07-24 17:33:10 · 1757 阅读 · 2 评论 -
Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPointerEx
因为Springfox 使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X以上使用的是PathPatternMatcher。原创 2023-07-10 20:53:15 · 9238 阅读 · 3 评论 -
docker: Error response from daemon: driver failed programming external connectivity on endpoint t1 (
在启动容器时的容器时,出现报错:Error response from daemon: driver failed programming external connectivity on endpoint XXX(端口映射或启动容器时报错)> docker: Error response from daemon: driver failed programming external connectivity on endpoint t1 (6f338343b5af13aaac43fcd95ace32c原创 2023-07-02 11:59:09 · 1288 阅读 · 0 评论 -
java.net.SocketException: Write failed: Broken pipe异常分析 .
近期,应用服务器经常抛出 java.net.SocketException: Write failed: Broken pipe异常,在网上搜了一下相关信息,现汇总如下:资料:Broken pipe产生的原因通常是当管道读端没有在读,而管道的写端继续有线程在写,就会造成管道中断。(由于管道是单向通信的) SIGSEGV(Segment fault)意味着指针所对应的地址是无效地址,没有物理内存对应...原创 2018-05-23 14:48:01 · 8998 阅读 · 0 评论 -
解决JavaSoft\Prefs Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002
“Could not open/create prefs root node Software\JavaSoft\Prefs atroot 0x80000002. Windows RegCreateKeyEx(...) returned error code 5”,虽然不影响tomcat的运行,程序也可以正常运行,但是既然报错肯定有隐患,于是决定解决这个问题。此问题已纠结多时,前面尝试过多重方法,...原创 2018-04-25 15:16:40 · 7926 阅读 · 0 评论 -
containing working copy admin area is missing
SVN进行同步时出现的问题:Working copy not locked; this is probably a bug, please reportsvn: Directory 'D:/workspace/myzjhk/WebRoot/WEB-INF/classes/org/.svn' containing working copy admin area is missing解...原创 2018-08-30 14:16:44 · 453 阅读 · 0 评论 -
Could not publish to the server.Please assign JRE to the server
1、错误描述2、错误原因 由错误提示可知,是Tomcat未绑定JRE,导致报错3、解决办法(1)删除新建Tomcat(2)重新新建一个Tomcat,配置好Tomcat路径和JRE路径...原创 2018-07-11 14:36:05 · 967 阅读 · 0 评论 -
Java JsonParseException异常的解决
在开发工作过程中,有遇到以下异常的其实是参数异常,也就是json的拼装有问题。在接口对接的时候,对方传过来的json解析报错:org.codehaus.jackson.JsonParseException: Unexpected character ('c' (code 99)): was expecting double-quote to start field nameat [S...原创 2018-10-29 16:52:52 · 46108 阅读 · 0 评论 -
eclipse Errors running builder “Integrated External Tool Builder“ on project project.
在eclipse构建项目的时候,一直报如下错误:Errors during build.Errors running builder "Integrated External Tool Builder" on project project.The builder launch configuration could not be found.Errors running builder...原创 2019-02-28 18:54:56 · 1619 阅读 · 0 评论 -
docker: Error response from daemon: Conflict. The container name is already in use by container You
docker: Error response from daemon: Conflict. The container name "/u1" is already in use by container "220980332c82079bd5b89b4129e8f5e77dba32ee3c0d2b0da51c961c00f39771". You have to remove (or rename) that container to be able to reuse that name.原创 2023-07-02 07:44:19 · 10356 阅读 · 2 评论 -
docker compose 报超时error pulling image configuration: tcp 104.18.123.25:443: i/o timeout
docker compose下载 速度太慢导致超时使用的是github的源基本都是超时。原创 2023-06-18 13:21:25 · 3075 阅读 · 0 评论 -
unable to access ‘https://github.com/dongguo4812/article.git/‘: SSL certificate problem: unable to
新电脑安装git ,克隆个项目,但是发现clone不下来,unable to access ‘https://github.com/dongguo4812/article.git/’: SSLcertificate problem: unable to原因Git client in Fisheye/Crucible server perform verification on the SSLcertificate and stop the process if it is unknown.原创 2021-10-26 10:04:25 · 1059 阅读 · 0 评论 -
ES:NoSuchMethodError: org.elasticsearch.client.Request.addParameters(Ljava/util/Map;)V
在项目pom.xml中加入依赖```java<dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>7.6.1</version></dependency> <dependency>原创 2021-10-29 20:09:15 · 2606 阅读 · 2 评论 -
springboot 2.3.0以后版本使用JestClient操作es不支持自动注入问题
由于springboot 2.3.0以后版本不支持自动注入JestClient,如下图我们在配置文件中配置JestClient时会出现红线提示。我们采取手动配置的方式采用手动注入的方式:@Testvoid contextLoads() { JestClient jestClient = getJestCline(); //List<PmsSkuInfo> pmsSkuInfos= skuService.findAllSkuInfo(); System.out原创 2021-10-30 17:20:52 · 534 阅读 · 0 评论 -
java.lang.NoSuchMethodError: org.elasticsearch.search.SearchHits.getTotalHits().value
java.lang.NoSuchMethodError: org.elasticsearch.search.SearchHits.getTotalHits().value错误构建String Boot整合Elasticsearch7.x版本时报错原因是版本不匹配…版本对比Spring Boot2.3.0以下不能够支持到ES7.x,个别调用相同时出现错误:ES6.x版本调用:long total = response.getHits().getTotalHits();ES6.x版本源码如下:原创 2021-10-30 19:39:51 · 2378 阅读 · 0 评论 -
ElasticSearch 7.X.0 Root mapping definition has unsupported parameters
新建索引PUT forum{ "mappings": { "article" : { "properties" : { "articleID" : { "type" : "keyword" } } } }然后,报错:{ "error" : { "root_cause" : [ { "type" : "mapper_parsing_exception",原创 2021-10-31 08:13:18 · 904 阅读 · 0 评论 -
线上使用雪花算法生成id重复问题
项目中使用的是hutool工具类库提供的雪花算法生成id方式,版本使用的是5.3.1雪花算法生成id方式提供了getSnowflake(workerId,datacenterId)获取单例的Snowflake对象,并对生成id的方法nextId()进行了synchronized加锁处理。项目中使用雪花算法举例controller。原创 2022-12-12 21:39:02 · 10265 阅读 · 1 评论 -
解决报错Cannot connect to the Maven process. Try again later. If the problem persists......
点击setting进入设置界面,然后依次点击Build,Execution,Deployment --> Build Tools --> Maven --> Importing --> JDK for import 在此设置对应的 JDK版本即可,我的是jdk1.8。查看源码的时候,没有官方注解提示需要下载源码,点击后报上述错误,百度一番才知道是meaven中jdk版本不对,在设置中修改即可。原创 2023-01-07 10:28:31 · 2893 阅读 · 2 评论