cancel
Showing results for 
Search instead for 
Did you mean: 

ActivitiExplorer pointing to wrong database?

mingway
Champ in-the-making
Champ in-the-making
Hi,
I have ActivitiExplorer 5.12, running in Eclipse/WTP/tomcat, the db is oracle.

First i point it to dev db, all data are correct, i can see 6 users on user-page.

Then I changed db.properties and point it to qa db, there is only 1 user, kermit in qa db. When I try to login, it's connecting to the correct qa db, so I'm able to use kermit to login. But when I open user-page, it's showing 6 users. If I change 1 user's name in dev db, I can see the change in the gui.

So seems login is using the correct qa db, but all other services, like task, historyService are still using the wrong dev db.

Is it cached? Or is there any other db config?

From logs, I can see they are using different api to get db connection:

When login:
[2013-12-12 14:34:30,999] http-bio-8080-exec-5 org.springframework.jdbc.datasource.DataSourceTransactionManager DEBUG - Acquired Connection [jdbcSmiley Surprisedracle:thin:@cmpwdev-scan.sdc.com:1521/qa2_svc, UserName=WFLOW, Oracle JDBC driver] for JDBC transaction
[2013-12-12 14:34:30,999] http-bio-8080-exec-5 org.apache.ibatis.transaction.managed.ManagedTransaction DEBUG - Openning JDBC Connection

When open user page:
[2013-12-12 14:34:31,669] http-bio-8080-exec-5 org.apache.ibatis.transaction.jdbc.JdbcTransaction DEBUG - Openning JDBC Connection
[2013-12-12 14:34:31,679] http-bio-8080-exec-5 org.apache.ibatis.datasource.pooled.PooledDataSource DEBUG - Checked out connection 1947326607 from pool.


Thanks for help,


1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Resolving of the DB-properties is done using a org.springframework.beans.factory.config.PropertyPlaceholderConfigurer. Make sure there is only ONE db.properties on the classpath and make sure that contains the values you need.

Explorer caches users when it boots, so modifying the database while explorer runs, will not update the cache. Rather, modify all user-related stuff from within the "manage" tab of explorer, this passed though the cache and updates accordingly.

Alternatively, you can edit the activiti-standalone-context.xml and replace the {jdbc.username} placeholders by the actual values or use another way to define a datasource (eg. JNDI, …).