当前位置:网站首页>请求数据库报错:“could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGram
请求数据库报错:“could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGram
2022-07-03 05:16:00 【YTIANYE】
报错信息
IDEA提示:
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order orderpo0_ where orderpo0_.id is not null'访问API返回结果:
{
"status": 500,
"error": "Internal Server Error",
"message": "could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet",
}解决方法:
查询一些解决方案大多是数据库表修改后,与Java的类名称不对应,驼峰命名在数据库表中转为下划线方式,但是我的字段命名没有错误。
@Data
@Entity
@Table(name = "order")
public class OrderPO {
@Id
@GenericGenerator(name = "uuid2", strategy = "org.hibernate.id.UUIDGenerator")
@GeneratedValue(generator = "uuid2")
String id;
String customerId;
String customerName;
String packageId;
String packageName;
String modules;
String securityGroupRuleId;
}后来发现是因为数据库的表名包含关键字,我的表命名为了order,改为order_form就可以了。
边栏推荐
- Interview question -- output the same characters in two character arrays
- Webrtc M96 release notes (SDP abolishes Plan B and supports opus red redundant coding)
- 5-36v input automatic voltage rise and fall PD fast charging scheme drawing 30W low-cost chip
- Gbase8s composite index (I)
- Principles of BTC cryptography
- The consumption of Internet of things users is only 76 cents, and the price has become the biggest obstacle to the promotion of 5g industrial interconnection
- [set theory] relation properties (transitivity | transitivity examples | transitivity related theorems)
- Gbase8s unique index and non unique index
- "Hands on deep learning" pytorch edition Chapter II exercise
- 1106 lowest price in supply chain (25 points)
猜你喜欢

Botu uses peek and poke for IO mapping

Compile and decompile GCC common instructions

微服务常见面试题

Gbase8s composite index (I)

Yolov5 network structure + code + application details | CSDN creation punch in

Online VR model display - 3D visual display solution

Interface frequency limit access

Overview of basic knowledge of C language

谷歌 | 蛋白序列的深度嵌入和比对

The principle is simple, but I don't know how to use it? Understand "contemporaneous group model" in one article
随机推荐
Use posture of sudo right raising vulnerability in actual combat (cve-2021-3156)
Interview question -- output the same characters in two character arrays
Appium 1.22. L'Inspecteur appium après la version X doit être installé séparément
Yolov5 network structure + code + application details | CSDN creation punch in
Webrtc protocol introduction -- an article to understand ice, stun, NAT, turn
Congratulations to musk and NADELLA on their election as academicians of the American Academy of engineering, and Zhang Hongjiang and Fang daining on their election as foreign academicians
乾元通多卡聚合路由器的技术解析
Go practice -- design patterns in golang's singleton
Technical analysis of qianyuantong multi card aggregation router
Webrtc native M96 version opening trip -- a reading code download and compilation (Ninja GN depot_tools)
[develop wechat applet local storage with uni app]
2022-02-12 daily clock in: problem fine brush
50 practical applications of R language (36) - data visualization from basic to advanced
[backtrader source code analysis 4] use Python to rewrite the first function of backtrader: time2num, which improves the efficiency by 2.2 times
leetcode435. Non overlapping interval
Introduction to deep learning - definition Introduction (I)
Introduction to redis and explanation of data types
1118 birds in forest (25 points)
es7创建索引容易犯的错误
1099 build a binary search tree (30 points)