当前位置:网站首页>请求数据库报错:“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就可以了。
边栏推荐
- 112 stucked keyboard (20 points)
- [backtrader source code analysis 5] rewrite several time number conversion functions in utils with Python
- Notes | numpy-09 Broadcast
- Source insight garbled code solution
- Botu uses peek and poke for IO mapping
- 1118 birds in forest (25 points)
- Webrtc protocol introduction -- an article to understand ice, stun, NAT, turn
- 最大连续子段和(动态规划,递归,递推)
- 动态规划——相关概念,(数塔问题)
- [set theory] relationship properties (common relationship properties | relationship properties examples | relationship operation properties)
猜你喜欢

Oracle SQL table data loss

酒店公共广播背景音乐-基于互联网+的酒店IP网络广播系统设计

Intégration profonde et alignement des séquences de protéines Google

2022-02-11 daily clock in: problem fine brush

Shallow and first code

Compile and decompile GCC common instructions
![[basic grammar] Snake game written in C language](/img/cb/83631ef3ccd7047ca42d33dc49bf90.jpg)
[basic grammar] Snake game written in C language

XML配置文件

Silent authorization login and registration of wechat applet
![[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)](/img/34/d195752992f8955bc2a41b4ce751db.jpg)
[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)
随机推荐
Rust基础入门之(基本类型)
Differences among bio, NiO and AIO
Technical analysis of qianyuantong multi card aggregation router
微服务常见面试题
Web APIs exclusivity
[set theory] relation properties (transitivity | transitivity examples | transitivity related theorems)
Introduction to redis and explanation of data types
XML配置文件
cookie session jwt
MySQL master-slave configuration
[research materials] annual report of China's pension market in 2021 - Download attached
聊聊如何利用p6spy进行sql监控
JS function algorithm interview case
Maximum continuous sub segment sum (dynamic programming, recursive, recursive)
appium1.22.x 版本後的 appium inspector 需單獨安裝
音频焦点系列:手写一个demo理解音频焦点与AudioMananger
【实战项目】自主web服务器
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
JS string and array methods
Redis 入門和數據類型講解