UniversalConnectionPoolManagerMBean already registered.

Posted by Vladimir Bezugliy on Stack Overflow See other posts from Stack Overflow or by Vladimir Bezugliy
Published on 2010-04-26T08:32:07Z Indexed on 2010/04/26 8:33 UTC
Read the original article Hit count: 1002

Filed under:
|
|

I have two web applications.
Both of yhem use oracle.ucp.UniversalConnectionPool.
When I deploy these applications on JBoss I get following exception:

java.sql.SQLException: Unable to start the Universal Connection Pool: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: MBean exception occurred while registering or unregistering the MBean
    at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:541)
    at oracle.ucp.jdbc.PoolDataSourceImpl.throwSQLException(PoolDataSourceImpl.java:588)
    at oracle.ucp.jdbc.PoolDataSourceImpl.startPool(PoolDataSourceImpl.java:277)
    at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:647)
    at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:614)
    at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:608)
    at org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy.afterPropertiesSet(LazyConnectionDataSourceProxy.java:163)
...  
Caused by: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: MBean exception occurred while registering or unregistering the MBean
    at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:541)
    at oracle.ucp.jdbc.PoolDataSourceImpl.throwSQLException(PoolDataSourceImpl.java:588)
    at oracle.ucp.jdbc.PoolDataSourceImpl.startPool(PoolDataSourceImpl.java:248)
    ... 212 more
Caused by: oracle.ucp.UniversalConnectionPoolException: MBean exception occurred while registering or unregistering the MBean
    at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:421)
    at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:389)
    at oracle.ucp.admin.UniversalConnectionPoolManagerMBeanImpl.getUniversalConnectionPoolManagerMBean(UniversalConnectionPoolManagerMBeanImpl.java:148)
    at oracle.ucp.jdbc.PoolDataSourceImpl.startPool(PoolDataSourceImpl.java:243)
    ... 212 more
Caused by: java.security.PrivilegedActionException: javax.management.InstanceAlreadyExistsException: oracle.ucp.admin:name=UniversalConnectionPoolManagerMBean already registered.
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.ucp.admin.UniversalConnectionPoolManagerMBeanImpl.getUniversalConnectionPoolManagerMBean(UniversalConnectionPoolManagerMBeanImpl.java:135)
    ... 213 more
Caused by: javax.management.InstanceAlreadyExistsException: oracle.ucp.admin:name=UniversalConnectionPoolManagerMBean already registered.
    at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:756)
    at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:233)
    at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
    at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
    at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
    at oracle.ucp.admin.UniversalConnectionPoolManagerMBeanImpl$2.run(UniversalConnectionPoolManagerMBeanImpl.java:141)
    ... 215 more

Definition of data source bean:

<bean id="oracleDataSource" class="oracle.ucp.jdbc.PoolDataSourceFactory" factory-method="getPoolDataSource">
    <!-- hard coded properties -->
    <property name="connectionFactoryClassName" value="oracle.jdbc.pool.OracleDataSource" />
    <property name="validateConnectionOnBorrow" value="true" />
    <property name="connectionPoolName" value="ORACLE_CONNECTION_POOL" />
...
</bean>

Does anyone know how to fix this problem?

© Stack Overflow or respective owner

Related posts about connection-pooling

Related posts about Oracle