Cannot create PoolableConnectionFactory

Issue:

The Kernel is not able to connect to MySql Backend Database and throws the Error

"Cannot create PoolableConnectionFactory (No tables used)"

Excerpt from Logs:

2013-11-25 06:32:36 org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (No tables used)
2013-11-25 06:32:36 at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
2013-11-25 06:32:36 at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
2013-11-25 06:32:36 at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
2013-11-25 06:32:36 at com.adeptia.indigo.utils.BackendDatabaseConnection.getBackendConnection(BackendDatabaseConnection.java:73)
2013-11-25 06:32:36 at com.adeptia.indigo.license.LicenseValidator.checkAcceleratorGroupDeployed(LicenseValidator.java:288)
2013-11-25 06:32:36 at com.adeptia.indigo.license.LicenseValidator$3.run(LicenseValidator.java:125)
2013-11-25 06:32:36 at java.lang.Thread.run(Unknown Source)
2013-11-25 06:32:36 Caused by: java.sql.SQLException: No tables used
2013-11-25 06:32:36 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
2013-11-25 06:32:36 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
2013-11-25 06:32:36 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
2013-11-25 06:32:36 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
2013-11-25 06:32:36 at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
2013-11-25 06:32:36 at com.mysql.jdbc.Connection.execSQL(Connection.java:3206)
2013-11-25 06:32:36 at com.mysql.jdbc.Statement.executeQuery(Statement.java:1232)
2013-11-25 06:32:36 at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
2013-11-25 06:32:36 at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:658)
2013-11-25 06:32:36 at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1558)
2013-11-25 06:32:36 at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
2013-11-25 06:32:36 ... 6 more
2013-11-25 06:32:36,105 INFO [Enterprise Business Integration Management Suite 6.0 Kernel Thread] kernel com.adeptia.indigo.IndigoKernel.boot(IndigoKernel.java:281) - ||||null|||||null|Registering core mbeans|swtestdip01.test.steelwedge.com|
2013-11-25 06:32:38,100 ERROR [License Validator Thread : Validate Services] storage com.adeptia.indigo.storage.jdo.JdoEntityManager$CustomDatabase.performRetry(JdoEntityManager.java:2784) - ||User||null|||||null|Failed to connect to Backend Database. Performing retries[null]|swtestdip01.test.steelwedge.com|

Solution

In order to resolve the issue enable the testOnBorrow and validationQuery property for connection pooling. In server-configure.properties file there is a property "abpm.cluster.testOnBorrow" and "abpm.cluster.validationQuery" which is used to validate connection from the backend database and check if connection pool is available. These will ensure that the connection is active and is not closed.

In property "abpm.cluster.validationQuery" provide the Select Query like "Select * from Dual"(Oracle and MySql). This Dual is a small table in the data dictionary that Oracle Database and user-written programs can reference to guarantee a known result. The dual table is useful when a value must be returned only once.

The Dual table has one column called dummy and one row containing the value X.

Note: Before providing the query "Select * from Dual" do make sure it is working by executing on the respective Database. 

Have more questions? Submit a request

0 Comments

Article is closed for comments.