当前位置:网站首页>Summary of common JDBC exceptions and error solutions
Summary of common JDBC exceptions and error solutions
2022-06-25 23:34:00 【_ Qilixiang】
Catalog
java.sql.SQLException: Invalid column index
java.sql.SQLException: ORA-00911: Invalid character
java.sql.SQLException: ORA-01017: invalid username/password; login denied
java.sql.SQLException: Io abnormal : The Network Adapter could not establish the connection at
java.sql.SQLException: No sutiable driver found for jsbc:oracle1:thin:
java.sql.SQLException: Invalid column index
1、sql List of ? The number of symbols does not match the number of variables provided :
for example :jdbcTemplate.update(sql, new Object[] {newState,oldState});
If sql There are 1 individual ? Number ,Object[] Yes 2 individual , You're going to report a mistake .
2、sql In the string ? The number is not written correctly
english ? And Chinese ? Sometimes it's hard to tell .
3、sql List of ? No '' All in all .
for example :sql="UPDATE abc SET abc.name='?' WHERE abc.id='?'";
hold '' Just remove it .
4, In this case select*from user where info like %?%;
Although this is sql Writing , But in jdbc It needs to be changed to select*from user where info like ?;
Such as ps.setString(1,“%”+value+“%”);
java.sql.SQLException: ORA-00911: Invalid character
String sql = "insert into test1 values(1416270201,' Zhang San ',' Dingxi ','01-8 month -17');";
Write one more semicolon
![]()
java.sql.SQLException: ORA-01017: invalid username/password; login denied
User password error 、 User name error :
![]()
java.sql.SQLException: Io abnormal : The Network Adapter could not establish the connection at
The firewall of the host to which you want to connect is turned off or its corresponding service is not turned on :
![]()
java.sql.SQLException: No sutiable driver found for jsbc:oracle1:thin:
URL Wrong writing
![]()
边栏推荐
- 对卡巴斯基发现的一个将shellcode写入evenlog的植入物的复现
- golang Make a list of intervals with sequential numbers
- 【opencv450-samples】读取图像路径列表并保持比例显示
- Fegin client entry test
- hiberate架构介绍及环境搭建(非常详细)
- Implementation of importing vscode from PDM
- What is Unified Extensible Firmware Interface (UEFI)?
- [Axi] interpretation of Axi protocol atomic access
- Leaky API interface practical development series (13): gooseneck cloud service php-api two-dimensional array parameter transfer solution
- C. Fibonacci Words-April Fools Day Contest 2021
猜你喜欢

hiberate架构介绍及环境搭建(非常详细)

Use of xinchida ble 5.0 Low Power Bluetooth module (at command serial port transparent transmission) rsbrs02abr

做接口测试,这3种工具到底什么时候用?

经典图像分割网络:Unet 支持libtorch部署推理【附代码】

Leaky API interface practical development series (13): gooseneck cloud service php-api two-dimensional array parameter transfer solution

Kotlin空指针Bug

CTS RTS RX TX in serial port flow control UART (direct communication between serial port module and MCU)

What aspects should we start with in the feasibility analysis of dry goods?

What is Unified Extensible Firmware Interface (UEFI)?

The first public available pytorch version alphafold2 is reproduced, and Columbia University is open source openfold, with more than 1000 stars
随机推荐
Multithreaded learning 2- call control
字符串
Informatics Orsay all in one 1353: expression bracket matching | Luogu p1739 expression bracket matching
我的vscode
做接口测试,这3种工具到底什么时候用?
Circuit module analysis exercise 6 (switch)
Pointer strengthening and improvement
Pycharm student's qualification expires, prompting no suitable licenses associated with account solution
Applets - view and logic
【AXI】解读AXI协议原子化访问
记一次beego通过go get命令后找不到bee.exe的坑
leetcode_ 136_ A number that appears only once
BI-SQL丨存储过程(一)
Day3 data types and operators summary and job
28 rounds of interviews with 10 companies in two and a half years (including byte, pinduoduo, meituan, Didi...)
UE4 学习记录二 给角色添加骨架,皮肤,及运动动画
Day4 branch and loop summary and operation
Go语言逃逸分析全纪录
ACM. Hj16 shopping list ●●
My vscode