Camunda Mssql querie issue

aused by: org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column ‘START_TIME_’ from result set. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from int to TIMESTAMP is unsupported.

The error may exist in org/camunda/bpm/cockpit/plugin/base/queries/processInstance.xml

The error may involve cockpit.base.selectRunningProcessInstancesIncludingIncidents

The error occurred while handling results

SQL: select distinct INSTANCE.ID_, INSTANCE.BUSINESS_KEY_, INSTANCE.START_TIME_, INSTANCE.SUSPENSION_STATE_, INCIDENT.INCIDENT_TYPE_, INCIDENT.INCIDENT_COUNT_ from ( SELECT SUB.* FROM ( select RES.* , row_number() over (ORDER BY START_TIME_ desc) rnk FROM ( select distinct RES.* , null START_TIME_ from ACT_RU_EXECUTION RES inner join ACT_RE_PROCDEF P on RES.PROC_DEF_ID_ = P.ID_ left JOIN ( SELECT A.* FROM ACT_RU_AUTHORIZATION A WHERE A.TYPE_ < 2 AND ( A.USER_ID_ in ( ?, ‘’) OR A.GROUP_ID_ IN ( ? , ? , ? , ? ) ) AND ( ( A.RESOURCE_TYPE_ = ? AND A.PERMS_ &? = ? OR A.RESOURCE_TYPE_ = ? AND A.PERMS_ &? = ? ) ) ) AUTH ON (AUTH.RESOURCE_ID_ in (RES.PROC_INST_ID_, P.KEY_, '’)) WHERE RES.ID_ = RES.PROC_INST_ID_ and RES.PROC_DEF_ID_ = ? and EXISTS ( select PROC_INST_ID_ from ACT_RU_EXECUTION where RES.ID_ = PROC_INST_ID_ and ( ACT_ID_ = ? ) and PROC_DEF_ID_ = ? ) AND AUTH.RESOURCE_ID_ IS NOT NULL )RES ) SUB WHERE SUB.rnk >= ? AND SUB.rnk < ? ) INSTANCE left join ( select INCIDENT.PROC_INST_ID_, INCIDENT.INCIDENT_TYPE_, count(INCIDENT.ID_) INCIDENT_COUNT_ from ACT_RU_INCIDENT INCIDENT where INCIDENT.PROC_DEF_ID_ = ? group by INCIDENT.PROC_INST_ID_, INCIDENT.INCIDENT_TYPE_ ) INCIDENT on INSTANCE.ID_ = INCIDENT.PROC_INST_ID_ order by START_TIME_ desc

Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column ‘START_TIME_’ from result set. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from int to TIMESTAMP is unsupported.

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.selectList(DbSqlSession.java:95)
at org.camunda.bpm.cockpit.impl.db.QueryServiceImpl$1.execute(QueryServiceImpl.java:39)
at org.camunda.bpm.cockpit.impl.db.QueryServiceImpl$1.execute(QueryServiceImpl.java:33)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
... 81 more

Caused by: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column ‘START_TIME_’ from result set. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from int to TIMESTAMP is unsupported.
at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:68)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getPropertyMappingValue(DefaultResultSetHandler.java:463)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyPropertyMappings(DefaultResultSetHandler.java:432)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:908)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForNestedResultMap(DefaultResultSetHandler.java:873)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:320)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:295)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:192)
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.BatchExecutor.doQuery(BatchExecutor.java:93)
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:148)
… 87 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from int to TIMESTAMP is unsupported.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:191)
at com.microsoft.sqlserver.jdbc.DataTypes.throwConversionError(DataTypes.java:1632)
at com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:3963)
at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:226)
at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:144)

Hi @praveen_buya,

Could you please share steps to reproduce this issue.

Best regards,
Yana

Hi I have migrated from MySql to MsSql,

i have started the process using rest API, which was working well with MYSql but with MSSql i am not able to see the process in cockpit getting above exception in logs and attached cockpit screeshot for reference. Process steps are going through fine but issue in viewing process instance in cockpitview.

Hi @praveen_buya,

What Camunda version do you use?
How did you migrated form mysql to mssql? How did you migrate the existence data? Is this process instance one of the migrated?

Best regards,
Yana

I am using camunda 7.8.0 on wildfly 10.1.0 .

I have not migrated any existing data this is completely new flow and new data in MsSql.

Hi @yana.vasileva ,

is there any fix for this issue

Hi @praveen_buya,

I was able to reproduce the issue and I will create a ticket for it.
As workaround you can try to turn on the history.

Best regards,
Yana

1 Like

Hi @yana.vasileva is there any update about the issue, is that fix done.

Hi @praveen_buya,

I created the CAM-8975, however it is not fixed yet.
Are interested in providing pull request for it? Or you can try the workaround.

Best regards,
Yana