JPA java.sql.SQLSyntaxErrorException:ORA-00936:缺少表达式

时间:2017-01-10 16:18:36

标签: java oracle jpa eclipselink jpql

我有一个生成该原生查询的JPQL查询:

SELECT ID, MODALNAMES, NAME, NUMBER, TABLE_CONFIG_ID FROM TAB_CONF_TABS WHERE (TABLE_CONFIG_ID = ?)

它出了什么问题?我的数据库是Oracle。

这是控制台中出现的错误:

javax.ejb.EJBTransactionRolledbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression

Error Code: 936
Call: SELECT ID, MODALNAMES, NAME, NUMBER, TABLE_CONFIG_ID FROM TAB_CONF_TABS WHERE (TABLE_CONFIG_ID = ?)
    bind => [25]
Query: ReadAllQuery(name="tabs" referenceClass=TabConfig sql="SELECT ID, MODALNAMES, NAME, NUMBER, TABLE_CONFIG_ID FROM TAB_CONF_TABS WHERE (TABLE_CONFIG_ID = ?)")

0 个答案:

没有答案