错误异常累积(二)

异常累积

1、ERROR: GEOSIntersects: TopologyException: side location conflict at

pg数据库检测图形压占时异常,标识图形本身不正确,存在边位置冲突

2、No value specified for ‘Date’

java进行将map数据结构转换为bean时异常 BeanUtils.populate(splitDch,data);

原因为map结构中,bean有类型为Date的字段值为空,补充数据即可

或者执行前:ConvertUtils.register(new DateConverter(null), java.util.Date.class);

3、java.util.NoSuchElementException: No value bound

springboot启动失败,没有配置数据源

4、虚拟机nat网络模式无法联网

原因是主机服务

VMware Nat Service 未启动

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-rY9U4R8z-1681873157765)(D:\第二阶段学习笔记\虚拟机主机nat服务.png)]

5、mybatis if标签判断字段是否等于值时,判定失败,字符类型字段需要添加.toSrting(),否则匹配失败

<if test="rwzt=='0'.toString()">    
    rwzt in ('1','2')
</if>
<if test="rwzt=='1'.toString() or rwzt=='2'.toString()">    
    rwzt=#{rwzt}
</if>

6、docker安装redis镜像,本地下载的为redis:bullseye 版本,但启动总是去下载latest版本的镜像启动,原因是启动脚本 -d 后需要指定脚本,否则默认为latest

7、启动redis容器失败

Warning: Could not create server TCP listening socket 10.40.50.156:6379: bind: Cannot assign requested address
Failed listening on port 6379 (TCP), aborting.

无法监听主机的地址,检测为redis.conf配置文件中bind配置了ip错误,注释掉

bind 127.0.0.1 10.20.40.156

8、Error: Invalid or corrupt jarfile

启动spring boot jar包异常,包上传不全,空间不足导致仅上传部分

9、org.postgresql.util.PSQLException: ERROR: cached plan must not change result type

ion: ERROR: cached plan must not change result type

pg数据库修改表结构后立即访问接口异常,继续使用修改之前的预编译语句失效,jdbc失效后将会重新执行预编译,会自我修复

10、Caused by: java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK

使用mybatisplus-generator代码生成器生成代码时,Oracle数据库读取表数据异常,根据提示缺少orai18n依赖,加入即可

<dependency>    
<groupId>com.oracle.database.nls</groupId>    
<artifactId>orai18n</artifactId>
<version>19.7.0.0</version>
</dependency>

11、java.lang.IllegalArgumentException: argument type mismatch

参数类型不匹配,在map转bean对象时异常。map对应字段的值类型与对象类型不匹配,对应字段转换处理即可

12、ORA-00907: missing right parenthesis

Oracle建表时异常,提示缺少右括号,但事实上不是此原因,而是建表语句中,将PRIMARY KEY主键指定关键字放在了DEFULT SYS_GUID() NOT NULL 之前,导致失败。

应如下:

CREATE TABLE “xxx”.“xxxx”
(
“BSM” VARCHAR2(60) DEFAULT SYS_GUID() NOT NULL PRIMARY KEY
);

13、ORA-01461: 仅能绑定要插入 LONG 列的 LONG 值

mybatis批量插入数据至Oracle时异常,使用foreach会将大字符串参数转为Long超出范围异常,使用begin ; end; 达到批量插入的效果解决

14、不需要显示的在启动类上加上注解@EnableEurekaClient也能注册到eureka

开启eureka.client.enable=true和eureka.client.register-with-eureka=true两个配置,默认都为true.
开启之后spring将会扫描org.springframework.cloud.netflix.eureka.EurekaAutoServiceRegistration注入bean
并向eureka服务端注册

15、Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web dependency.

springboot集成gateway启动报错,引入的gateway依赖与手动引入的spring-boot-starter-web依赖不兼容,去掉显示引入的。

<dependency>   
<groupId>org.springframework.cloud</groupId>    
<artifactId>spring-cloud-starter-gateway</artifactId>    <version>2.2.5.RELEASE</version>
</dependency>

16、数据库时间类型字段,springboot项目查询到前端之后时间有了时区的偏差

spring.application.jackson.time-zone=GMT+8
指定spring返回json数据后的时间字段的时区。

17、nacos2.1.0版本源码编译异常:Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default-cli) on project demo: protoc did not exit cleanly. Review output for more information.

因为我的源码路径包含了中文名称,但定位的时候没有想到这一点,花费了不少的时间

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值