Can't retrieve default tenant id


Bonita BPM Community 6.2.2 bundled with Tomcat

Ubuntu 12.10 64bit with Oracle Java version 7.51
Tomcat is running, when I access http://localhost:8080 I get the default tomcat home page, add /bonita I get the following error message;
HTTP Status 500 - org.bonitasoft.console.common.server.utils.DefaultTenantIdException: Can't retrieve default tenant id
Reviewing the log I find

Feb 27, 2014 10:42:09 AM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection is broken: " Connection refused: localhost:9091" [90067-170])

Further down in the log I find this;

  1. aused by: org.h2.jdbc.JdbcSQLException: Connection is broken: " Connection refused: localhost:9091" [90067-170]<br />
  2. at org.h2.message.DbException.getJdbcSQLException(<br />
  3. at org.h2.message.DbException.get(<br />
  4. at org.h2.engine.SessionRemote.connectServer(<br />
  5. at org.h2.engine.SessionRemote.connectEmbeddedOrServer(<br />
  6. at org.h2.jdbc.JdbcConnection.<init>(<br />
  7. at org.h2.jdbc.JdbcConnection.<init>(<br />
  8. at org.h2.Driver.connect(

I have completely removed reference to the H2 listener from server.xml, following is the line I removed;

I'm connecting to a mysql database on an external server, I have updated to point to my sql server as shown;

  1. esource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource<br />
  2. resource.ds1.driverProperties.user=xxxx<br />
  3. resource.ds1.driverProperties.password=xxxx<br />
  4. resource.ds1.driverProperties.URL=jdbc:mysql://srvmysql:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8<br />
  5. resource.ds1.driverProperties.testQuery=SELECT 1

And my bonita.xml been update;

validationQuery="SELECT 1"

Finally setup the with the proper database type; B_OPTS="-Dsysprop.bonita.db.vendor=mysql". Added mysql-connector-java-5.1.29-bin.jar to the /lib directory. I have went into platform-tenant-config.porperties and added the line platform.create=true.

What else am I missing? Happy to supply my log but like to know what is the best way to share it?

Thanks for your help.


5 answers


I had the same problem and also in log file there was an ERROR which said "packet for query is too large".
By adding max_allowed_packet = 32M in my.cnf file bellow** [mysqld] **and restarting mysql server I could connect to portal and load login page.


I don't understand, I was postive I posted a solution to my issue, but now I don't see it. It would appear I owe you an apology. Want I found out in the inst. located here was to add the following line

Note: add to the appropriate section in the file

resource.ds1.driverProperties.testquery=Select 1 (or "Select 1 from Dual" for oracle)
When I commented this line out it started working.


Submitted by DeclanMcGarry on Thu, 03/13/2014 - 20:46

And sorry I was away from the thread for so long - I'm glad you got it sorted out.

Strange that the commend vanished. if it happens again we can refer it to the admin on this site.


Found the issue with my setup, under the setup insturcations there is this

Note: add to the appropriate section in the file

resource.ds1.driverProperties.testquery=Select 1 (or "Select 1 from Dual" for oracle)
I comment it out and now connecting to mysql and i can access the default web page.


Tested the user and password set in bonita by logging into the mysql database from the bonita server. I was able to login with the designated user, create tables. I did have to issue command "use BonitaV6" before I could create a table. How does this user know which database to use or is it expected that this user be able to create the database?


Submitted by DeclanMcGarry on Fri, 02/28/2014 - 20:57

the database to use is in the connect string (the URL in the config file). in the example you posted you are looking for the database called bonita - it is what is directly after the portnumber/ in the URL. if it's called bonita here, and bonitaV6 on your server, that might be the problem.

otherwise, can we see the log file? (you can post it here, or if you have a dropbox you can share).


Hi TheB2B,

there are a bunch of things on the checklist for server setup. I read your submission and I think you've covered most of them. Have you created the (empty) bonita DB on srvmysql and given user xxxxxx admin rights to it?

try starting up and see what the log says the problem is.

and you can post the log entry here if you like - just take care to truncate it so that it is only the bit from the startup.




Submitted by TheB2B on Wed, 03/05/2014 - 20:34

Preformed the points suggested, still unable to successfully get Bonita running.

Any further suggestions? I'm open to try most anything at this point, provide more information, looking for some help here please.

Submitted by DeclanMcGarry on Wed, 03/05/2014 - 21:53

can you post the log file here, or put it in a dropbox location and share it with me?

i've configured bonita lots of times to use different databases, including mySQL. the problems are usually diagnosed in the log file, but the log file can is not structured very well, so it can be difficult to figure out where the error is. that's why getting a look at the log file would (i think) ne useful.


Submitted by TheB2B on Wed, 03/05/2014 - 21:59

Here is what I believe you are looking for;

If not let me know, thanks for the help!

Submitted by DeclanMcGarry on Thu, 03/13/2014 - 16:43

Hi TheB2B,

so, apologies for getting back to you so late - i was swamped on a project.

Thanks for posting the log file. I think key line from the log is :

Caused by: no writeable property 'testQuery' in class 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource'

so look at the line :

resource.ds1.driverProperties.URL=jdbc:mysql://srvmysql:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 resource.ds1.driverProperties.testQuery=SELECT 1
in the bitronix resource properties file. Are there any issues with it? driverProperties for the mySQL driver allow a testQuery property, so my best guess, without looking at the file is that there is a stray character here. check that all the properties are on a new line, and that there are no trailing spaces.
let me know if that helps?
Submitted by TheB2B on Fri, 03/14/2014 - 13:08

Found source of the problem, in the setup inst there is a line to add the following;

Note: add to the appropriate section in the file

resource.ds1.driverProperties.testquery=Select 1 (or "Select 1 from Dual" for oracle)
When I commented the line, I was able to connect to the sql server and web page now loads. I my case this part of the inst is invalid, wonder if anybody else has had similar experinces?