当前位置:网站首页>请求数据库报错:“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就可以了。
边栏推荐
- [set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)
- Notes | numpy-10 Iterative array
- The IntelliJ platform completely disables the log4j component
- ES7 easy mistakes in index creation
- 小学校园IP网络广播-基于校园局域网的小学IP数字广播系统设计
- Maximum continuous sub segment sum (dynamic programming, recursive, recursive)
- leetcode406. Rebuild the queue based on height
- Notes | numpy-07 Slice and index
- [set theory] relational power operation (relational power operation | examples of relational power operation | properties of relational power operation)
- Webrtc native M96 version opening trip -- a reading code download and compilation (Ninja GN depot_tools)
猜你喜欢
![[set theory] relational power operation (relational power operation | examples of relational power operation | properties of relational power operation)](/img/8b/c10423ee95200a0d94f9fb9dde76eb.jpg)
[set theory] relational power operation (relational power operation | examples of relational power operation | properties of relational power operation)

Appium 1.22. L'Inspecteur appium après la version X doit être installé séparément

leetcode406. Rebuild the queue based on height
![[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree](/img/0f/bc8c44aee7a2c9dccac050b1060017.jpg)
[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree

Burp suite plug-in based on actual combat uses tips

BTC-密码学原理
![[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached](/img/01/052928e7f20ca671cdc4c30ae55258.jpg)
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached

Common interview questions of microservice

Go practice -- gorilla / websocket used by gorilla web Toolkit

酒店公共广播背景音乐-基于互联网+的酒店IP网络广播系统设计
随机推荐
Bluebridge cup real topic 2020 palindrome date simulation construction provincial competition
Overview of basic knowledge of C language
[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached
Use posture of sudo right raising vulnerability in actual combat (cve-2021-3156)
Webapidom get page elements
Go language interface learning notes Continued
Yolov5 network structure + code + application details | CSDN creation punch in
JQ style, element operation, effect, filtering method and transformation, event object
[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)
Interview question -- output the same characters in two character arrays
[basic grammar] Snake game written in C language
Yolov5 model construction source code details | CSDN creation punch in
在PyCharm中配置使用Anaconda环境
穀歌 | 蛋白序列的深度嵌入和比對
1118 birds in forest (25 points)
音频焦点系列:手写一个demo理解音频焦点与AudioMananger
BTC-密码学原理
Differences among bio, NiO and AIO
Source insight garbled code solution
Messy change of mouse style in win system