ORA-01747: select count(RES.*) from ACT_HI_VARINST RES WHERE RES.PROC_INST_ID_ = ?

Description

oracle should use "select count(RES.ID_)" instead of count(RES.*)

Detail behind:
HistoricVariableInstanceQuery query = historyService.createHistoricVariableInstanceQuery()
.processInstanceId(processInstanceId).orderByVariableName().asc();

query.count();
org.apache.ibatis.exceptions.PersistenceException:

  1.  

    1.  

      1. Error querying database. Cause: org.hibernate.exception.SQLGrammarException: ORA-01747: user.table.column, table.column ______

  1.  

    1.  

      1. The error may exist in org/activiti/db/mapping/entity/HistoricVariableInstance.xml

      2. The error may involve org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceCountByQueryCriteria-Inline

      3. The error occurred while setting parameters

      4. SQL: select count(RES.*) from ACT_HI_VARINST RES WHERE RES.PROC_INST_ID_ = ?

      5. Cause: org.hibernate.exception.SQLGrammarException: ORA-01747: user.table.column, table.column ______

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)
at org.activiti.engine.impl.db.DbSqlSession.selectOne(DbSqlSession.java:290)
at org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntityManager.findHistoricVariableInstanceCountByQueryCriteria(HistoricVariableInstanceEntityManager.java:56)
at org.activiti.engine.impl.HistoricVariableInstanceQueryImpl.executeCount(HistoricVariableInstanceQueryImpl.java:130)
at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:145)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.AbstractQuery.count(AbstractQuery.java:132)

Environment

db:oracle

Assignee

Frederik Heremans

Reporter

shawn young

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure