SQLite related query error is not a sql syntax error, as follows, it has appeared many times, please give me a look_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:45:04
Original
1021 people have browsed it

HTTP Status 500 - Request processing failed; nested exception is org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback failed

root cause

org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: rollback failed

org.hibernate.TransactionException: unable to rollback against JDBC connection


root cause

java.sql.SQLException: SQL logic error or missing database

SQL语句:select name,phone,idcard,nowlive,ofCompany,stationCode,type,status,certificatecode from(
select p.name,p.phone,p.idcard,p.nowlive,p.ofcompany ,p.stationcode ,p.type,p.status,z.CertificateCode 
FROM basicperson p join BasicZhengJ z on p.phone=z.phone)

很简单的子查询,可以在查询分析器正确执行,放入dao实现类运行就报以上错误
求解决!!!


回复讨论(解决方案)

放五一都没个人了??????????????????哎

.... (
select p.name,p.phone,p.idcard,p.nowlive,p.ofcompany ,p.stationcode ,p.type,p.status,z.CertificateCode 
FROM basicperson p join BasicZhengJ z on p.phone=z.phone)  T
需要指定别名

.... (
select p.name,p.phone,p.idcard,p.nowlive,p.ofcompany ,p.stationcode ,p.type,p.status,z.CertificateCode 
FROM basicperson p join BasicZhengJ z on p.phone=z.phone)  T
需要指定别名


首先感谢版主的问候,其次,我试了没用,SQL语句没有错

用HQL语法,就可以解决!

解决了!哎,五一都没人呢?

楼主自己怎么解决的给总结一下,也好给别的人一个参考嘛 :) 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!