gpt4 book ai didi

java - 使用 SpringData 的 WebSphere 上的 ORA-00907

转载 作者:行者123 更新时间:2023-12-02 03:08:52 33 4
gpt4 key购买 nike

我遇到以下问题。我尝试在 IBM WebSphere 9.0.0.9 上运行我的应用程序。我的应用程序使用 Spring Data。我有非常简单的存储库和简单的方法:

public interface TerminalGroupRepository extends JpaRepository<TerminalGroup, String> {
List<TerminalGroup> findByNodeNodeIdIn(Collection<Long> nodeIds);
}

由于未知的原因,当我尝试在 WebSphere 上运行它时,抛出以下异常:

 Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.7.WAS-v20180710-6c446ab): org.eclipse.persistence.exceptions.DatabaseException 
Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis
Error Code: 907
Call: SELECT t1.terminalgroupid, t1.DESCRIPTION, t1.NAME, t1.nodeid FROM dm_terminalgroup t1 LEFT OUTER JOIN node t0 ON (t0.nodeid = t1.nodeid) WHERE (t0.nodeid IN ((?,?)))
bind => [2 parameters bound]
Query: ReadAllQuery(referenceClass=TerminalGroup sql="SELECT t1.terminalgroupid, t1.DESCRIPTION, t1.NAME, t1.nodeid FROM dm_terminalgroup t1 LEFT OUTER JOIN node t0 ON (t0.nodeid = t1.nodeid) WHERE (t0.nodeid IN (?))")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:684)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2061)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:586)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:261)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:262)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:248)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:319)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:715)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2772)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2725)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:559)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1175)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:911)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1134)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:460)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1222)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2899)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1863)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1845)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1810)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
... 158 more
Caused by: java.sql.SQLSyntaxErrorException: ORA-00907: missing right parenthesis
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:747)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:904)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)
at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java:1228)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:746)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1009)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)
... 179 more
Caused by: Error : 907, Position : 155, Sql = SELECT t1.terminalgroupid, t1.DESCRIPTION, t1.NAME, t1.nodeid FROM dm_terminalgroup t1 LEFT OUTER JOIN node t0 ON (t0.nodeid = t1.nodeid) WHERE (t0.nodeid IN ((:1 ,:2 ))), OriginalSql = SELECT t1.terminalgroupid, t1.DESCRIPTION, t1.NAME, t1.nodeid FROM dm_terminalgroup t1 LEFT OUTER JOIN node t0 ON (t0.nodeid = t1.nodeid) WHERE (t0.nodeid IN ((?,?))), Error Msg = ORA-00907: missing right parenthesis
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
... 197 more

那里发生了什么?谢谢您的任何建议...

最佳答案

In 子句在 EclipseLink 中被破坏,并且在某种程度上它们仍然被破坏。

参见https://bugs.eclipse.org/bugs/show_bug.cgi?id=349477以及引用的问题。

Spring Data JPA 的当前快照包含一个解决方法,只要您作为参数传递的集合不为 null,该解决方法就应该有效。

参见https://jira.spring.io/browse/DATAJPA-433

关于java - 使用 SpringData 的 WebSphere 上的 ORA-00907,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57005863/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com