Heim > Artikel > Web-Frontend > SQLite 关联查询报错,不是sql语法错误,如下,出现好多次了,求大神给看看_html/css_WEB-ITnose
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
需要指定别名
用HQL语法,就可以解决!
解决了!哎,五一都没人呢?
楼主自己怎么解决的给总结一下,也好给别的人一个参考嘛 :)