malaganguo的踩坑合集

目录

trap1. 下拉框无法赋值

Connection to @172.16.25.79 failed.[08006][1034] ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-x86_64 Error: 2: No such file or directoryAdditional information: 4150Additional information: -1612462601

使用JDBC连接MySql时出现:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration

针对mysql8.0报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create

Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:     org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]

Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.


trap1. 下拉框无法赋值

问题阐述:下拉框在初始化的时候需要发送ajax请求选项内容,操作中在发送请求后便往下拉框中赋值,实际上异步请求还没有执行完,所以初始化失败,下拉框中无法初始化值。

解决办法:给下拉框加flag,在ajax请求完成以后再允许进行赋值、取值操作。

Connection to @172.16.25.79 failed.
[08006][1034] ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 4150
Additional information: -1612462601
 

用dataGrip连接oracle数据库出错!原因:dataGrip在生成的Oracle的URL格式是错误的,角色和端口之间本应该是斜杠:

datagrip操作oracle问题多多,赶紧卸载,安装plsql!

 

使用JDBC连接MySql时出现:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration

在连接字符串后面加上?serverTimezone=UTC

其中UTC是统一标准世界时间。

完整的连接字符串示例:jdbc:mysql://localhost:3306/test?serverTimezone=UTC

或者还有另一种选择:jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8,这个是解决中文乱码输入问题,当然也可以和上面的一起结合:jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC

 

针对mysql8.0报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create

JDBC的驱动版本和MySQL版本版本没有对应,修改成对应版本的JDBC即可。

 

Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

快速设置,直接在workbench里面的查询窗口输入“SET SQL_SAFE_UPDATES = 0;”就可以了。

图形界面设置:

1. 在workbench的菜单栏点击“edit-->Preferences”,然后会弹出对话框“workbench preferences”;

2. 在“workbench”左边栏点击“SQL Editor”,会看到最后一行是“Safe Updates……”是打钩的,我们只要缺消打钩即可。

3.当上面设置好之后,请重启workbench

 

org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]

Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.

解决办法:在web.xml的<web-app>标签下添加<absolute-ordering/>标签。为什么这么做我也不知道。传送门:https://stackoverflow.com/questions/54290263/more-than-one-fragment-with-the-name-spring-web-was-found-this-is-not-legal-w

有人说absolute-ordering的所有子元素的name必须解析:https://www.jianshu.com/p/a02b8eef8e84

 

 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值