ProcessEngineException Unknown property after upgrading to new version

Hi,

I upgraded my camunda bpm ee 7.11.3 version up to latest camunda bpm ee 7.13.5 version.
I extracted the archive into a new directory.
I use a postgres external database so i applied all sql patches and sql upgrade script from 7.11.7 to 7.13.5_2.
I reported my jdbc conf from my previous server.xml file to the new one.
Now when i start the new bpm with startup.sh it’s actually starting and i can create new processes but i keep having :

ENGINE-REST500 org.camunda.bpm.engine.ProcessEngineException : Unknown property used in expression: #{rf01_client_identification == ‘rf01_non_identified_client’}. Cause: cannot resolve identifier ‘rf01_client_identification’

I also found this error :

Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near “)”

Position: 542

The error may exist in org/camunda/bpm/engine/impl/mapping/entity/HistoricProcessInstance.xml

The error may involve org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity.selectHistoricProcessInstancesByQueryCriteria-Inline

The error occurred while setting parameters

SQL: select distinct RES.* from ( SELECT SELF.*, DEF.NAME_, DEF.VERSION_, DEF.DEPLOYMENT_ID_ FROM ACT_HI_PROCINST SELF LEFT JOIN ACT_RE_PROCDEF DEF ON SELF.PROC_DEF_ID_ = DEF.ID_ WHERE ( 1 = 1 and SELF.BUSINESS_KEY_ like ? ESCAPE ‘’ and ( ) and SELF.SUPER_PROCESS_INSTANCE_ID_ is null and SELF.TENANT_ID_ in ( ? ) ) ) RES order by RES.START_TIME_ desc LIMIT ? OFFSET ?

Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near “)”

Position: 542
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.camunda.bpm.engine.impl.db.sql.DbSqlSession.lambda$executeSelectList$1(DbSqlSession.java:106)
at org.camunda.bpm.engine.impl.util.ExceptionUtil.doWithExceptionWrapper(ExceptionUtil.java:236)
… 69 more
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near “)”
Position: 542
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:138)
at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)

the “and( )” looks suspect to me.

Here is my DB conf in server.xml :

Resource name=“jdbc/ProcessEngine”
auth=“Container”
type=“javax.sql.DataSource”
factory=“org.apache.tomcat.jdbc.pool.DataSourceFactory”
uniqueResourceName=“process-engine”
driverClassName=“org.postgresql.Driver”
url=“jdbc:postgresql://…:5432/…”
defaultTransactionIsolation=“REPEATABLE_READS”
username="…"
password="…"
maxActive=“100”
minIdle=“5”
maxIdle=“100”
removeAbandoned=“true”
removeAbandonedTimeout=“60”
logAbandoned=“true”

Hi,

I finally found the problem.

As we use the API calling history/process-instance/count

We use to pass

{
“rootProcessInstances”:true,
“processInstanceBusinessKeyLike”:"%msisdn_%",
“sorting”:[{“sortBy”:“startTime”,“sortOrder”:“desc”}],
“processDefinitionKeyNotIn”:[],
“variables”:[],“tenantIdIn”:[“rflow”]
}

with processDefinitionKeyNotIn as an empty array [].

That was working on version 7.11.3 but not anymore on version >= 7.12