Bonitasoft 6.2. on Windows Server 2008R2, Tomcat 6 and SQL server database.



I followed all instructions to configure bonitasoft for SQL server. When I start bonitasoft the tables in the database are created (which proves that the credentials and permissions are okay). However, I keep getting the same error after the tables have been created.


Mar 05, 2014 6:25:00 PM recoverAllResources
WARNING: error running recovery on resource 'jdbc/bonitaDSXA', resource marked as failed (background recoverer will retry recovery) (error=XAER_RMERR)
javax.transaction.xa.XAException: The function RECOVER: failed. The status is: -3. Error: "*** SQLJDBC_XA DTC_ERROR Context: xa_recover, state=1, StatusCode:-3 (0xFFFFFFFD) ***"

Then after all the factory beans have been loaded, I get the following error:

WARNING: Could not obtain connection to query metadata
java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource jdbc/bonitaDSXA with 1 connection(s) (1 still available) -failed-

I guess it is some kind of bitronix issue. But the error message makes no sense to me. You cannot get a connection, but there is a connection available. I even tried to change the minPoolSize to 5, which just leads to the error ...with 5 connection(s) (5 still available).

Can anyone point me to a solution for this problem.

Full catalina.out can be found here:

2 Answers



there is a wll know problem related to the use of XA transaction on SQL Server 2008 R2 and Tomcat.

I can give to you two suggestions:

  1. Use JBoss Instead Tomcat
  2. Use JTDS driver instead the official one from Microsoft. here you can find my answer to same question posted sometimes ago:

let me know if you'll solve the problem or you need more informations




Hi. Thank you for the update. I configured BonitaSoft for JDTA now, but still no succes. The relevant error I guess is in he bonita.log:

Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".)

If I connect using the same credentials I am using in and bonita.xml with SQL Server Management Studio I can succesfully connect, so there's no problem there. Remember that login with the MS SQL JDBC driver went correctly and tables were created.

Bonita.log here:

Catalina.out here:


Submitted by domenico.giordano Fri, 03/07/2014 - 09:57

So you decided to go on with Tomcat. Ok. your problem is related on how you configure the two datasources. here I am sending to you an example about the two different configuration:

Bitronix data source

  1. <xml>resource.ds1.className=net.sourceforge.jtds.jdbcx.JtdsDataSource<br />
  2. resource.ds1.driverProperties.user=bonita<br />
  3. resource.ds1.driverProperties.password=bpm<br />
  4. resource.ds1.driverProperties.serverName=<br />
  5. resource.ds1.driverProperties.portNumber=1433<br />
  6. resource.ds1.driverProperties.databaseName=bonita</xml>

Non transaction datasource (bonita.xml file)

  1. <!-- SQL Server with JTDS driver --><br />
  2. <Resource name="bonitaSequenceManagerDS"<br />
  3. auth="Container"<br />
  4. type="javax.sql.DataSource"<br />
  5. maxActive="17"<br />
  6. minIdle="5"<br />
  7. maxWait="10000"<br />
  8. initialSize="3"<br />
  9. validationQuery="SELECT 1"<br />
  10. validationInterval="30000"<br />
  11. removeAbandoned="true"<br />
  12. logAbandoned="true"<br />
  13. username="bonita"<br />
  14. password="bpm"<br />
  15. driverClassName="net.sourceforge.jtds.jdbc.Driver"<br />
  16. url="jdbc:jtds:sqlserver://"/>

Driver JTDS doesn't allow the use of URL properties.

let me know if it help you.