当前位置:网站首页>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
![]()
边栏推荐
- Qt Utf8 与 Unicode 编码的互相转换, Unicode编码输出为格式为 &#xXXXX
- Once beego failed to find bee after passing the go get command Exe's pit
- Ad20 learning notes II
- 解决TypeError: Unicode-objects must be encoded before hashing
- qtcreator 格式化代码
- Repoptimizer: it's actually repvgg2
- 【opencv450-samples】读取图像路径列表并保持比例显示
- Qt 中文和英文分别使用不同的字体
- 漏刻有时API接口实战开发系列(13):小鹅通云服务PHP-API二维数组传参解决方案
- Comp2913 database
猜你喜欢

Efr32bg22 ble module (low power Bluetooth communication module) at command test

字符串

【opencv450-samples】inpaint 使用区域邻域恢复图像中的选定区域

Pointer strengthening and improvement

YUV444、YUV422、YUV420、YUV420P、YUV420SP、YV12、YU12、NV12、NV21

Kubernetes cluster construction of multiple ECS

首个大众可用PyTorch版AlphaFold2复现,哥大开源OpenFold,star量破千

【AXI】解读AXI协议原子化访问

社招两年半10个公司28轮面试面经(含字节、拼多多、美团、滴滴......)
![[modulebuilder] GP service realizes the intersection selection of two layers in SDE](/img/4a/899a3c2a0505d2ec2eaae97a3948c9.png)
[modulebuilder] GP service realizes the intersection selection of two layers in SDE
随机推荐
What is Unified Extensible Firmware Interface (UEFI)?
关于go中资源泄漏/goroutine泄漏/内存泄漏/CPU打满等情况分析
社招两年半10个公司28轮面试面经(含字节、拼多多、美团、滴滴......)
Leetcode(435)——无重叠区间
C. Planar Reflections-CodeCraft-21 and Codeforces Round #711 (Div. 2)
Windows redis installation and simple use
#24class静态成员
分享一个OSGeo4W64下载好的库,基于qgis3.10的
Kotlin空指针Bug
C1. k-LCM (easy version)-Codeforces Round #708 (Div. 2)
Repoptimizer: it's actually repvgg2
24class static member
hiberate架构介绍及环境搭建(非常详细)
QLabel 文字水平滚动显示
Applets - view and logic
Core points of assembly language
OBS-Studio-27.2.4-Full-Installer-x64.exe 下载
[2023 proofreading and bidding questions] Part 1: Measurement Technology FPGA post (roughly analytical version)
How to use drawing comparison function in CAD
Leaky API interface practical development series (13): gooseneck cloud service php-api two-dimensional array parameter transfer solution