当前位置:网站首页>请求数据库报错:“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就可以了。
边栏推荐
- 音频焦点系列:手写一个demo理解音频焦点与AudioMananger
- Handler understands the record
- XML配置文件
- Botu uses peek and poke for IO mapping
- Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
- 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
- Chapter II program design of circular structure
- Audio Focus Series: write a demo to understand audio focus and audiomananger
- Introduction to deep learning (II) -- univariate linear regression
- [research materials] annual report of China's pension market in 2021 - Download attached
猜你喜欢

Class loading mechanism (detailed explanation of the whole process)

JS scope
![[research materials] 2022q1 game preferred casual game distribution circular - Download attached](/img/13/5a67c5d08131745759fdc70a71cf0f.jpg)
[research materials] 2022q1 game preferred casual game distribution circular - Download attached

Go practice -- design patterns in golang's singleton

Ueditor, FCKeditor, kindeditor editor vulnerability

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

【实战项目】自主web服务器

"Hands on deep learning" pytorch edition Chapter II exercise
![[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)

Go practice - gorilla / handlers used by gorilla web Toolkit
随机推荐
Introduction to rust Foundation (basic type)
Interview question -- output the same characters in two character arrays
JS string and array methods
(subplots usage) Matplotlib how to draw multiple subgraphs (axis field)
1107 social clusters (30 points)
C language program ideas and several commonly used filters
[basic grammar] Snake game written in C language
Common methods of JS array
XML配置文件
Go practice -- use JWT (JSON web token) in golang
最大连续子段和(动态规划,递归,递推)
Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
大学校园IP网络广播-厂家基于校园局域网的大学校园IP广播方案设计指南
Messy change of mouse style in win system
穀歌 | 蛋白序列的深度嵌入和比對
Problems encountered in fuzzy query of SQL statements
[set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)
Celebrate the new year together
Silent authorization login and registration of wechat applet
Based on RFC 3986 (unified resource descriptor (URI): general syntax)