Why deploying many CMP beans causes JBAS018514 error while fixing table name in EAP6 ?

Solution Unverified - Updated -

Issue

  • Why CMP persistence is using too much connections during server start.
  • From time to time our database in our test environment is busy and we're getting the following Exception when JBoss starts:
MSC service thread 1-20:MSC000001: Failed to start service jboss.deployment.unit."TestCMPApp.jar".component.TestEntity.jdbc.store-manager.INIT: org.jboss.msc.service.StartException in service jboss.deployment.unit."TestCMPApp.jar".component.TestEntity.jdbc.store-manager.INIT: JBAS010784: Failed to start JDBCStore
        at org.jboss.as.cmp.jdbc.JdbcStoreManagerInitService.start(JdbcStoreManagerInitService.java:46)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: java.lang.RuntimeException: JBAS018514: Error while fixing table name
        at org.jboss.as.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:191)
        at org.jboss.as.cmp.jdbc.bridge.JDBCEntityBridge.init(JDBCEntityBridge.java:145)
        at org.jboss.as.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:167)
        at org.jboss.as.cmp.jdbc.JdbcStoreManagerInitService.start(JdbcStoreManagerInitService.java:44)
        ... 5 more
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/global/TestDataSource
        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:151)
        at org.jboss.as.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:161)
        ... 8 more
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/global/TestDataSource
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:414)
        at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:488)
        at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:143)
        ... 9 more
Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (5000 [ms])
        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:434)
        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:404)
        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:372)
        at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:353)
        ... 12 more
  • The application contains CMP persistence (EJB2) with more than 80 entities. The datasource is configured with a "max-pool-size" of '10'. Looking into the server code "SQLUtil.java" it seems that for each entity to check the table name a new connection is obtained from the DataSource. With JBoss EAP5 we never had such an issue.
  • Why is the method of 'fixing table name' (fixTableName) getting a single connection per Entity ? Is it possible to switch this check off (we know our table names are correct) ?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content