Using Hibernate via UCP, maxPoolSize installation does not work with JBoss Fuse

Solution Unverified - Updated -

Issue

  • Using Hibernate via Oracle UCP, maxPoolSize installation does not work and If given a load module, Hibernate requests directly to an unlimited number of connections result in a business process, and throws following error:
ERROR | JDBCExceptionReporter            | 265 - com.springsource.org.hibernate - 3.3.2.GA | Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: All connections in the Universal Connection Pool are in use

.
.
.

Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70)[242:org.springframework.orm:3.1.3.RELEASE]
        at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:377)[242:org.springframework.orm:3.1.3.RELEASE]
        ... 6 more
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)[265:com.springsource.org.hibernate:3.3.2.GA]
        ... 8 more
Caused by: java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: All connections in the Universal Connection Pool are in use
        at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:488)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.util.UCPErrorHandler.throwSQLException(UCPErrorHandler.java:163)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:928)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:863)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:855)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)[265:com.springsource.org.hibernate:3.3.2.GA]
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)[265:com.springsource.org.hibernate:3.3.2.GA]
        ... 13 more
Caused by: oracle.ucp.UniversalConnectionPoolException: All connections in the Universal Connection Pool are in use
        at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:368)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:49)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:80)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.util.UCPErrorHandler.throwUniversalConnectionPoolException(UCPErrorHandler.java:131)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnectionWithoutCountingRequests(UniversalConnectionPoolImpl.java:279)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.common.UniversalConnectionPoolImpl.borrowConnection(UniversalConnectionPoolImpl.java:142)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.jdbc.JDBCConnectionPool.borrowConnection(JDBCConnectionPool.java:157)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:916)[282:wrap_mvn_com.oracle_ucp_11.2.0.3:0]
        ... 17 more
  • The Datasource configuration looks like following:
    <bean id="db.dataSource" class="oracle.ucp.jdbc.PoolDataSourceFactory" factory-method="getPoolDataSource">
        <property name="ConnectionFactoryClassName" value="oracle.jdbc.pool.OracleDataSource" />
        <property name="URL" value="#{moduleProps['test.url']}" />
        <property name="user" value="#{moduleProps['test.db.username']}" />
        <property name="password" value="#{moduleProps['test.db.password']}" />
        <property name="initialPoolSize" value="3" />
        <property name="maxPoolSize" value="#{moduleProps['test.db.maxPoolSize']}" />
        <property name="inactiveConnectionTimeout" value="120" />
        <qualifier value="test.db"/>
    </bean>

Environment

  • Red Hat JBoss Fuse
    • 6.0

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