ENGINE-16004 AuthorizationEntity.selectRevokeAuthorization - An identifier or literal is invalid

Instalation of Camunda-oracle-weblogic-7.12.2-ee

Database: Oracle 11g (11.2.0.4)
Server Applications: Weblogic 12.2
Java: 1.8.0-241

Error when try login by first time

Blockquote
SQL: SELECT CASE WHEN EXISTS ( SELECT ID_ FROM ACT_RU_AUTHORIZATION WHERE TYPE_ = 2 AND ( USER_ID_ IN (?, ‘*’) ) ) THEN 1 ELSE 0 END FROM DUAL
Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column ‘CASEWHENEXISTS(SELECTID_FROMACT_RU_AUTHORIZATIONWHERETYPE_=:"SYS_B_0"AND(USER_ID_IN(:1,:“SYS_B_1”)))THEN:"SYS_B_2"ELSE:"SYS_B_3"END’ from result set. Cause: java.sql.SQLException: An identifier or literal is invalid
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:97)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.selectBoolean(DbEntityManager.java:196)
at org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager.isRevokeAuthCheckEnabled(AuthorizationManager.java:292)
at org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager.isAuthorized(AuthorizationManager.java:268)
at org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager.isAuthorized(AuthorizationManager.java:251)
at org.camunda.bpm.engine.impl.cmd.AuthorizationCheckCmd.execute(AuthorizationCheckCmd.java:60)
at org.camunda.bpm.engine.impl.cmd.AuthorizationCheckCmd.execute(AuthorizationCheckCmd.java:36)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110)
… 76 more
Caused by: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column ‘CASEWHENEXISTS(SELECTID_FROMACT_RU_AUTHORIZATIONWHERETYPE_=:"SYS_B_0"AND(USER_ID_IN(:1,:“SYS_B_1”)))THEN:"SYS_B_2"ELSE:"SYS_B_3"END’ from result set. Cause: java.sql.SQLException: An identifier or literal is invalid
at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:68)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.createPrimitiveResultObject(DefaultResultSetHandler.java:720)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.createResultObject(DefaultResultSetHandler.java:607)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.createResultObject(DefaultResultSetHandler.java:586)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:388)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:347)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:322)
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.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:148)
… 86 more
Caused by: java.sql.SQLException: An identifier or literal is invalid
at oracle.jdbc.driver.PhysicalConnection.enquoteIdentifier(PhysicalConnection.java:10453)
at oracle.jdbc.driver.OracleStatement.enquoteIdentifier(OracleStatement.java:6452)
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3853)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:270)
at oracle.jdbc.driver.GeneratedResultSet.getInt(GeneratedResultSet.java:556)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_ForwardOnlyResultSet.getInt(Unknown Source)
at org.apache.ibatis.type.IntegerTypeHandler.getNullableResult(IntegerTypeHandler.java:37)
at org.apache.ibatis.type.IntegerTypeHandler.getNullableResult(IntegerTypeHandler.java:26)
at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:66)
… 102 more (58.8 KB)

Error-log.txt

Hi @mrclalves,

Can you also provide some information if:

  1. Oracle specifies that ojdbc6.jar needs to be used with JDK 8 when running Oracle 11g. Can you confirm that this is true?
  2. Oracle 11g doesn’t support batch processing in the Process Engine. Have you set the jdbcBatchProcessing flag to `false? (see the docs)

The two points above usually contribute to incorrect operation of the Process Engine when using the Oracle databases,

Best,
Nikola

Hi @nikola.koevski

  1. Oracle specifies that ojdbc6.jar needs to be used with JDK 8 when running Oracle 11g. Can you confirm that this is true?
  • JDK 8 - versão 1.8.0-241;
  1. Oracle 11g doesn’t support batch processing in the Process Engine. Have you set the jdbcBatchProcessing flag to `false?
  • Yes!

I will go get this information about drive JDBC of access Oracle.

Thank you very much Nidola.

Marcelo

Hi @nikola.koevski

The driver JDBC Oracle is ojdbc8.jar with JDK 1.8.0-241.

Thanks,

Marcelo

Hi Marcelo,

For Oracle 11g, ojdbc6 must be used. Please see the Oracle documentation (section What are the Oracle JDBC releases Vs JDK versions?) here: https://www.oracle.com/database/technologies/faq-jdbc.html.

Can you check if, by switching to ojdbc6, the problem is resolved?

Best,
Nikola

Hi Nikola,

Thanks by the link. I understood.

In this case, this bug, is happing only in environment of production. In environment of POC, development and homologation this working 100%, and the driver JDBC is ojdbc8.jar with JDK 1.8, in other words the environments are the same configuration.

I’m going to do the tests anyway.

Best,
Marcelo

Hi @nikola.koevski

Database’s equipe found the problem with the difrent configuration bettewing database where ‘CURSOR_SHARING=EXACT’ was the solution.

Thanks

Marcelo Alves