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 on 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

<xml>resource.ds1.className=net.sourceforge.jtds.jdbcx.JtdsDataSource<br />
        resource.ds1.driverProperties.user=bonita<br />
        resource.ds1.driverProperties.password=bpm<br />
        resource.ds1.driverProperties.serverName=<br />
        resource.ds1.driverProperties.portNumber=1433<br />
Non transaction datasource (bonita.xml file)

<!-- SQL Server with JTDS driver --><br />
        <Resource name="bonitaSequenceManagerDS"<br />
        auth="Container"<br />
        type="javax.sql.DataSource"<br />
        maxActive="17"<br />
        minIdle="5"<br />
        maxWait="10000"<br />
        initialSize="3"<br />
        validationQuery="SELECT 1"<br />
        validationInterval="30000"<br />
        removeAbandoned="true"<br />
        logAbandoned="true"<br />
        username="bonita"<br />
        password="bpm"<br />
        driverClassName="net.sourceforge.jtds.jdbc.Driver"<br />

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

let me know if it help you.