cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Database Management on Oracle

junidb
Champ in-the-making
Champ in-the-making
When deploying on Oracle, the new Explorer throws this message when going to the Database tab of Management.

### Error querying database. Cause: java.sql.SQLException: ORA-00942: table or view does not exist

### The error may involve org.activiti.engine.impl.TablePageMap.selectTableCount-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLException: ORA-00942: table or view does not exist

I tried debugging using the source code. When you try to search for tables which starts with ACT, the result is also giving back ACTION_TABLE, which is not a standard table. The oracle version I'm using is 11gR2.

Junid
10 REPLIES 10

krsmes
Champ in-the-making
Champ in-the-making
Adding a second vote to this question.

There is code in activiti that is looking for "ACT_%" tables.  This doesn't work for oracle as _ is a wildcard and it is picking up ACTION_TABLE which it then tries unsuccessfully to do some other query on (count?).

http://www.dba-oracle.com/tips_oracle_escape_characters.htm

For oracle it should be 'ACT\_%' with the escape specified: ESCAPE '\'.   Either that or come up with a more robust/generic way of getting a list of activiti tables than hard coding 'ACT_'.

FWIW, this does not seem to break activiti-explorer for some reason, but it does break when I run processEngine connected to oracle via a test case.

Activiti is unusable on Oracle at the moment unless I download the code a hack a workaround.

junidb
Champ in-the-making
Champ in-the-making
New update: worked on 3 databases: development server, testing server and local machine. Problem occurs on testing server and local machine. But somehow working on development server. Will spend time checking what is different.

junidb
Champ in-the-making
Champ in-the-making
Hi, found the problem. The problem occured because the DatabaseMetaData.getTables also include ACTION_TABLE, which comes from the Order Entry sample data. I deleted the OE user from my database and the application runs smoothly. HTH.

marcthomas2012
Champ in-the-making
Champ in-the-making
Are Activiti resolving this issue in the 5.11 release? It seems like a fairly straight forward issue and fix.

Can anyone from Activiti comment on this?

Thanks
Marc

frederikherema1
Star Contributor
Star Contributor
What "straight forward" fix do you propose, other than having a hard-coded  list of table names in our code (which is what we wanted to avoid in the first placed and wanted to fix with the ACT_ prefix).

marcthomas2012
Champ in-the-making
Champ in-the-making
Sorry, I shouldn't have put "straight forward". However, the code works the way it does today apart from on Oracle so a temporary fix of verifying if it is running on Oracle to escape the _ character would be better than nothing.

frederikherema1
Star Contributor
Star Contributor
That's a good suggestion, seemed to missed that suggested fix in the previous comments.

Just fixed this on master, in time for 5.11:
https://github.com/Activiti/Activiti/commit/5340c0cb454ed990aae8057ca2d9ccddc998aced

marcthomas2012
Champ in-the-making
Champ in-the-making
That's fantastic news, thanks. Is 5.11 still on target for the beginning of December? There are a couple of changes in there that will be great to get.

Thanks again.
Marc

frederikherema1
Star Contributor
Star Contributor
It'll be released the first week of December (since the 1st of December is on a saturday)