cancel
Showing results for 
Search instead for 
Did you mean: 

myBatis compatibility

logasram
Champ in-the-making
Champ in-the-making
Hi,
I am new to Apache Activiti BPM tool.
We are planning to define processes using Activiti BPM tool.
When we integrated Activiti process with our application, we found that the invocation singleResult() method (on ExecutionQuery and TaskQuery) failed every time with below exception,

HTTP Status 500 -
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
### The error may exist in org/activiti/db/mapping/entity/Execution.xml
### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.selectExecutionsByQueryCriteria-Inline
### The error occurred while setting parameters
### SQL: select * from
      (
         select a.*, ROWNUM rnum
         from
         (
            select distinct RES.* , P.KEY_ as ProcessDefinitionKey, P.ID_ as ProcessDefinitionId
            from ACT_RU_EXECUTION RES
            inner join ACT_RE_PROCDEF P on RES.PROC_DEF_ID_ = P.ID_
            WHERE RES.PROC_INST_ID_ = ?
            order by order by RES.ID_ asc
         ) a
         where ROWNUM < ?
      )
      where rnum >= ?
### Cause: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
(The order by clause was getting appended twice)
We understand that the activiti internal calls to database is made only using myBatis framework.
Upon analysis we found that the issue occurred due to the incompatible myBatis jar. Our application uses myBatis-3.3.0 but activiti works fine with myBatis3.2.5.
I need clarification for the below,
1. Is there any option to support latest myBatis version(as we are not supposed to downgrade myBatis)?
2. Is there any method that supports JDBC instead of myBatis, which would not impact if we upgrade to newer versions of myBatis in future?

Please help me here.
Thanks.


7 REPLIES 7

logasram
Champ in-the-making
Champ in-the-making
Hi,
Forgot to mention the Activiti version.
We are using 5.18.0

logasram
Champ in-the-making
Champ in-the-making
Hi,
Could you please help me here?

vasile_dirla
Star Contributor
Star Contributor
Hi,
There is an improvement request for this upgrade.
see: https://activiti.atlassian.net/browse/ACT-4081

1. I cannot see any possibility to use the latest myBatis except upgrading it to the latest version Smiley Happy (and all the necessary code changes..)
2. considering you are using 5.18 I there is no option for using other persistence frameworks  (such possibility will be available in Activiti 6 Smiley Happy )

Would be nice if you could upgrade myBatis to the latest version and create a PR. (what do you think, are you in ?)

Hi Vasile,
Thanks for your response.
I am unable to access the atlassian link provided by you.

Please correct me if my understanding is wrong,
1. Until I upgrade the Activiti, there is no possibility to use the latest myBatis .
2. There is no option to use any other framework except myBatis

"Would be nice if you could upgrade myBatis to the latest version and create a PR." - Sorry I am missing your context here.

vasile_dirla
Star Contributor
Star Contributor
hi,
1. About the JIRA link you cannot access: is about a improvement request starting from this conversation:  https://github.com/Activiti/Activiti/issues/597#issuecomment-150505937

In version 5.18 we use myBatis  3.2.5 and the only way to benefit of the latest version of myBatis is to upgrade myBatis library in Activiti.
If you think you can handle this myBatis upgrade you are welcome to do it and then create a pull request. (since it's a open source engine we're happy to see the community is bigger and the number of committers is growing)

I don't know what to say about when Activiti will use a newer version of myBatis but if a pull request will come, then for sure it's much probably to have it.

jorgheymans
Champ in-the-making
Champ in-the-making
Hi,

This is related so tagging onto this thread.

We have been (happily) using Activiti 5.10 for a number of years now in a large application. Currently we are facing an integration issue with an external library that depends on mybatis 3.3.0 .. I understand that this version is not supported in Activiti it uses 3.1.1 : we get this exception https://forums.activiti.org/content/activiti-5121-not-compatiable-mybatis-322

What are our options to get around this ? Could 5.10 be easily patched to use mybatis 3.3 ? What would the upgrade effort be for activiti 5.10 to the latest (assuming a more recent version of mybatis is indeed supported there)

Thanks,
Jorg

trademak
Star Contributor
Star Contributor
Hi Jorg,

There's a PR waiting to be merged, to support MyBatis 3.3.0:

https://github.com/Activiti/Activiti/pull/774

Best regards,