当前位置:网站首页>请求数据库报错:“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就可以了。
边栏推荐
- leetcode860. Lemonade change
- 1114 family property (25 points)
- Introduction to redis and explanation of data types
- 1110 complete binary tree (25 points)
- 1094 the largest generation (25 points)
- Introduction to deep learning (II) -- univariate linear regression
- [set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)
- study hard and make progress every day
- leetcode435. Non overlapping interval
- Promise
猜你喜欢
![[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached](/img/95/833f5ec20207ee5d7e6cdfa7208c5e.jpg)
[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached

Oracle SQL table data loss

leetcode435. Non overlapping interval

Actual combat 8051 drives 8-bit nixie tube

【批处理DOS-CMD命令-汇总和小结】-CMD窗口的设置与操作命令-关闭cmd窗口、退出cmd环境(exit、exit /b、goto :eof)

Use posture of sudo right raising vulnerability in actual combat (cve-2021-3156)

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

穀歌 | 蛋白序列的深度嵌入和比對

"Hands on deep learning" pytorch edition Chapter II exercise

Basic knowledge of reflection (detailed explanation)
随机推荐
The principle is simple, but I don't know how to use it? Understand "contemporaneous group model" in one article
Pessimistic lock and optimistic lock of multithreading
Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
大学校园IP网络广播-厂家基于校园局域网的大学校园IP广播方案设计指南
JQ style, element operation, effect, filtering method and transformation, event object
[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached
(subplots usage) Matplotlib how to draw multiple subgraphs (axis field)
Shuttle + alluxio accelerated memory shuffle take-off
Introduction to webrtc protocol -- an article to understand dtls, SRTP, srtcp
谷歌 | 蛋白序列的深度嵌入和比对
最大连续子段和(动态规划,递归,递推)
Introduction to redis and explanation of data types
1103 integer factorization (30 points)
leetcode452. Detonate the balloon with the minimum number of arrows
Dynamic programming - related concepts, (tower problem)
Go language interface learning notes Continued
BIO、NIO、AIO区别
Actual combat 8051 drives 8-bit nixie tube
[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)
Redis breakdown penetration avalanche