2021-06-23 10:30:22,500 ERROR [org.ametys.core.schedule.AmetysJob$org.ametys.plugins.contentio.synchronize.SynchronizeCollectionSchedulable] (AmetysRuntimeScheduler_Worker-2;) An exception occured during the execution of the Schedulable 'org.ametys.plugins.contentio.synchronize.SynchronizeCollectionSchedulable' org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00918: définition de colonne ambigu ### The error may exist in /org/ametys/plugins/userdirectory/synchronize/sql-user-search.xml ### The error may involve UserDirectory.search-Inline ### The error occurred while setting parameters ### SQL: SELECT o.ID, u.LOGIN , u.ROLE FROM ENTITE_AGENTS_RH u, ENTITE_RH o WHERE u.ENTITE_ID = o.ID ORDER BY PRIORITY ### Cause: java.sql.SQLSyntaxErrorException: ORA-00918: définition de colonne ambigu at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) at org.ametys.plugins.userdirectory.synchronize.SQLUserSearchDAO.searchUser(SQLUserSearchDAO.java:54) at org.ametys.plugins.userdirectory.synchronize.SQLSynchronizableUDOrgunitCollection._getOrgUnitUser(SQLSynchronizableUDOrgunitCollection.java:372) at org.ametys.plugins.userdirectory.synchronize.SQLSynchronizableUDOrgunitCollection._internalPopulate(SQLSynchronizableUDOrgunitCollection.java:271) at org.ametys.plugins.contentio.synchronize.AbstractSynchronizableContentsCollection.populate(AbstractSynchronizableContentsCollection.java:114) at org.ametys.plugins.contentio.synchronize.AbstractSimpleSynchronizableContentsCollection.populate(AbstractSimpleSynchronizableContentsCollection.java:76) at org.ametys.plugins.userdirectory.synchronize.SQLSynchronizableUDOrgunitCollection.populate(SQLSynchronizableUDOrgunitCollection.java:260) at org.ametys.plugins.contentio.synchronize.SynchronizeCollectionSchedulable._process(SynchronizeCollectionSchedulable.java:28) at org.ametys.plugins.contentio.synchronize.AbstractCollectionSchedulable.execute(AbstractCollectionSchedulable.java:50) at org.ametys.core.schedule.AmetysJob.execute(AmetysJob.java:151) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) Caused by: java.sql.SQLSyntaxErrorException: ORA-00918: définition de colonne ambigu at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509) at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:270) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:91) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:807) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:983) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666) at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3778) at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1081) at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94) at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94) at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324) at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147) ... 12 more Caused by: Error : 918, Position : 200, Sql = SELECT o.ID, u.LOGIN , u.ROLE FROM ENTITE_AGENTS_RH u, ENTITE_RH o WHERE u.ENTITE_ID = o.ID ORDER BY PRIORITY, OriginalSql = SELECT o.ID, u.LOGIN , u.ROLE FROM ENTITE_AGENTS_RH u, ENTITE_RH o WHERE u.ENTITE_ID = o.ID ORDER BY PRIORITY, Error Msg = ORA-00918: définition de colonne ambigu at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:513) ... 36 more
Raphael was saying we may need to escape the name priority
Or it is because two tables are using the same name priority, so the request should use u.PRIORITY and o.PRIORITY