67,515
社区成员
发帖
与我相关
我的任务
分享
@PersistenceContext()
private javax.persistence.EntityManager em;
javax.persistence.Query query = em.createNativeQuery(sql);
String[] arrayId = {182,139,213,400}
Hibernate: select user_id,count(1) cases_count from ts_topics where status=0 and user_id in ? group by user_id
09:46:47.768 [http-nio-9060-exec-1] WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 42601
09:46:47.769 [http-nio-9060-exec-1] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - 错误: 语法错误 在 "$1" 或附近的
位置:83
09:46:47.799 [http-nio-9060-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
org.postgresql.util.PSQLException: 错误: 语法错误 在 "$1" 或附近的
位置:83
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) ~[postgresql-9.1-901.jdbc4.jar:na]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) ~[postgresql-9.1-901.jdbc4.jar:na]