踩过的坑
记录出现的各种异常信息
王野也不野
毕业即失业的惨痛教训一直鞭策着我,我要更加努力的积累知识,沉淀经验!!!
展开
-
下载源码报错:Sources not found for org.javassistjavassist3.22.0-CR
下载源码报错:Sources not found for: org.javassist:javassist:3.22.0-CR场景在idea中下载源码得到时候出现:Cannot download sources解决方案执行mvn dependency:resolve -Dclassifier=sources原创 2022-03-04 10:47:49 · 180 阅读 · 0 评论 -
CentOS团队从官方镜像中移除CentOS 8的所有包,导致yum报错:Cannot prepare internal mirrorlist No URLs in mirrorlist
CentOS团队从官方镜像中移除CentOS 8的所有包,导致yum报错:Cannot prepare internal mirrorlist: No URLs in mirrorlist问题在CentOS 8中,使用yum时出现错误,镜像列表中没有url,类似如下:# 输入命令yum list | grep telnet# error 内容如下Error: Failed to download metadata for repo 'appstream': Cannot prepare inte原创 2022-02-22 16:44:55 · 2453 阅读 · 0 评论 -
MySQL连接出现问题:‘ipiAddress‘ is not allowed to connect to this MySQL serverConnection closed by foreign
问题描述:@Host ‘ipAddr’ is not allowed to connect to this MySQL serverConnection closed by foreign host.原因分析应该是Mysql的IP地址被锁定了解决办法将root用户登录IP全部开放出来select user,host from mysql.user where user = 'root';## 如果host != '%' 将其改为'%'update mysql.user set hos.原创 2021-10-31 13:24:40 · 760 阅读 · 0 评论 -
“_bin_bash^M_ bad interpreter_ No such file or directory”解决方案
问题描述今天在写Shell脚本的时候,执行出现的异常信息“/bin/bash^M: bad interpreter: No such file or directory”原因分析确定不是语法问题后,断定为文件格式问题,应为我是在Windows上写好的,然后CP到LINUX中解决办法linux中查看脚本格式(dos or unix)vim fileName# 查看文本格式:set ff修改文本格式# dos2unix 会将dos文件格式转为unixdos2u.原创 2021-10-29 21:18:50 · 88 阅读 · 0 评论 -
idea下载源码出现Cannot download sources Sources not found for: xxx
项目场景:解决idea中无法通过“download source”下载源码的问题问题描述:解决idea中无法通过“download source”下载源码的问题maven 下载源码找不到异常如下:```cSources not found for: org.springframework.security:spring-security-config:5.3.6.RELEASE``` 解决方案:在终端中执行:mvn dependency:resolve -Dclassifier=原创 2021-10-14 14:36:05 · 1201 阅读 · 0 评论 -
时间序列化问题
时间序列化问题问题描述最近在开发过程中,从数据库中拿到记录时间是国内时间,在Java程序中看到的Date格式也是正确的,通过网络传输后返回到前端页面,时间对应的时区错了。原因分析时间数据在通过网络序列化后,传输是格式应该出了问题。解决方案在对应实体类的时间属性加上:import com.fasterxml.jackson.annotation.JsonFormat;//解决时间序列化格式不一致问题@JsonFormat(timezone = "GMT+8", pattern = "yyy原创 2021-07-15 10:21:19 · 89 阅读 · 0 评论 -
ES项目中出现:Caused by java.lang.ClassNotFoundException org.springframework.http.HttpHeaders
SpringBoot 整合ES项目启动报错:Caused by: java.lang.ClassNotFoundException: org.springframework.http.HttpHeaders现象整合elasticSearch项目启动报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticsearchClient' defined in class p原创 2021-05-24 08:03:55 · 1471 阅读 · 0 评论 -
解决Hystrix DashBoard中的Unable to connect to Command Metric Stream
解决Hystrix DashBoard中的Unable to connect to Command Metric Stream.解决方案是在SpringBoot启动类中加上一个组件: /** * 此配置是为了服务监控而配置,与服务容错本身无关,SpringCloud升级后的坑 * ServletRegistrationBean因为springboot的默认路径不是"/hystrix.stream", * 只要在自己的项目里配置上下面的servlet就可以了原创 2021-05-02 12:35:11 · 163 阅读 · 0 评论 -
Feign读取超时问题 --feign.RetryableException: Read timed out executing
feign.RetryableException: Read timed out executing异常信息如下:Read timed out executing GET http://CLOUD-PROVIDER-HYSTRIX-PAYMENT8008/payment/hystrix/error/1feign.RetryableException: Read timed out executing GET http://CLOUD-PROVIDER-HYSTRIX-PAYMENT8008/payme原创 2021-05-01 14:29:56 · 1685 阅读 · 0 评论 -
SpringCloud整合Zookeeper异常问题----Caused by: org.apache.zookeeper.KeeperException$UnimplementedException
SpringCloud整合Zookeeper异常问题异常信息:org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /services/cloud-provider-payment8004/19e0e1b2-8918-4c82-830e-0d214b65776b at org.apache.zookeeper.KeeperException.create(Keep原创 2021-04-30 08:40:41 · 968 阅读 · 0 评论 -
AOP Around通知中出现空指针异常
AOP Around通知中出现空指针异常问题描述:在配置 <aop:pointcut id=“pt1” expression=“execution( * edu.xl.source.aop.Calculator.*(…))”/>后一直出现空指针异常AOP的配置主要原因是:aroundInfo 没有返回值,修改如下: public Object aroundInfo(ProceedingJoinPoint pjd) throws Throwable { Syste原创 2021-04-26 08:53:58 · 1007 阅读 · 0 评论 -
Maven接管IDEA后,后台输出中文乱码
Maven接管IDEA后,后台输出中文乱码解决方案是:在VM Options后面加上:-Dfile.encoding=GB2312原创 2021-04-26 08:02:33 · 49 阅读 · 0 评论 -
NoClassDefFoundError: org/aspectj/lang/JoinPoint
NoClassDefFoundError: org/aspectj/lang/JoinPoint控制台输出:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': BeanPostProcessor before instantiation of bea原创 2021-04-25 18:33:34 · 786 阅读 · 0 评论 -
@ConfigurationProperties给自定义的属性赋值不成功的原因
@ConfigurationProperties给自定义的属性赋值不成功的原因YML配置文件中的内容aliyun: oss: file: endpoint: oss-cn-hangzhou keyid: afga5tafgfafga keysecret: 4afgafgafh bucketname: afgaagg读取配置文件的类:@Component@ConfigurationProperties(prefix = "aliyun.o原创 2021-04-02 20:04:35 · 1992 阅读 · 1 评论