Beans won't load on oracle

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Beans won't load on oracle

Douglas Ferguson-3
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
        at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
        ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
        at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
        at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
        ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
        at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
        at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
        at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
        ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
        at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
        at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
        ... 42 more
Caused by: javax.transaction.xa.XAException
        at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
        at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
        at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
        at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
        ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beans won't load on oracle

snicoll
I would say, try harder. The exception you have here is most probably because the user has not these grants.

See the stack trace in the FAQ for a reference [1]

Moreover, if this is working fine with H2 and postgres and not with Oracle with this exception, chances are very high this is related to these grants. We had the same problem too with the exact same environment (postgres, h2, oracle).

S

[1] http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisBTM12refusingtostartwhenconfiguredwithOraclewhile11worksfine

On Tue, Feb 21, 2012 at 6:09 PM, Douglas Ferguson <[hidden email]> wrote:
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
       at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
       ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
       at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
       ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
       ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
       ... 42 more
Caused by: javax.transaction.xa.XAException
       at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
       ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beans won't load on oracle

Douglas Ferguson-3
We added the grants and still no dice.

I tried this one 3 different environments with 2 different oracle versions.

Douglas

On Feb 22, 2012, at 12:24 AM, Stephane Nicoll wrote:

I would say, try harder. The exception you have here is most probably because the user has not these grants.

See the stack trace in the FAQ for a reference [1]

Moreover, if this is working fine with H2 and postgres and not with Oracle with this exception, chances are very high this is related to these grants. We had the same problem too with the exact same environment (postgres, h2, oracle).

S

[1] http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisBTM12refusingtostartwhenconfiguredwithOraclewhile11worksfine

On Tue, Feb 21, 2012 at 6:09 PM, Douglas Ferguson <[hidden email]> wrote:
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
       at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
       ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
       at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
       ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
       ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
       ... 42 more
Caused by: javax.transaction.xa.XAException
       at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
       ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beans won't load on oracle

Ludovic Orban-2
Just to make sure: you got the following grants executed, right?

grant select on sys.dba_pending_transactions to <pool_user>;
grant select on sys.pending_trans$ to <pool_user>;
grant select on sys.dba_2pc_pending to <pool_user>;
grant execute on sys.dbms_system to <pool_user>;

What happens when you manually log on Oracle with your connection pool's account and try select * from sys.dba_pending_transactions ?

Could you please also post your exact Oracle server version and JDBC driver version?


2012/2/22 Douglas Ferguson <[hidden email]>
We added the grants and still no dice.

I tried this one 3 different environments with 2 different oracle versions.

Douglas

On Feb 22, 2012, at 12:24 AM, Stephane Nicoll wrote:

I would say, try harder. The exception you have here is most probably because the user has not these grants.

See the stack trace in the FAQ for a reference [1]

Moreover, if this is working fine with H2 and postgres and not with Oracle with this exception, chances are very high this is related to these grants. We had the same problem too with the exact same environment (postgres, h2, oracle).

S

[1] http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisBTM12refusingtostartwhenconfiguredwithOraclewhile11worksfine

On Tue, Feb 21, 2012 at 6:09 PM, Douglas Ferguson <[hidden email]> wrote:
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
       at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
       ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
       at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
       ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
       ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
       ... 42 more
Caused by: javax.transaction.xa.XAException
       at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
       ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beans won't load on oracle

Douglas Ferguson-3
I ran those grants on the older 10G db and the newer 11G db I granded to sys.dbms_xa instead.

Yes I verified the user had the grants by running a select

I  upgraded to the latest java 1.6 oracle drivers from oracle's website.  ojdbc6.jar which is the 11G driver.
Previously we are running ojdbc14.jar which are the 10G drivers.

Douglas

On Feb 22, 2012, at 7:48 AM, Ludovic Orban wrote:

Just to make sure: you got the following grants executed, right?

grant select on sys.dba_pending_transactions to <pool_user>;
grant select on sys.pending_trans$ to <pool_user>;
grant select on sys.dba_2pc_pending to <pool_user>;
grant execute on sys.dbms_system to <pool_user>;

What happens when you manually log on Oracle with your connection pool's account and try select * from sys.dba_pending_transactions ?

Could you please also post your exact Oracle server version and JDBC driver version?


2012/2/22 Douglas Ferguson <[hidden email]>
We added the grants and still no dice.

I tried this one 3 different environments with 2 different oracle versions.

Douglas

On Feb 22, 2012, at 12:24 AM, Stephane Nicoll wrote:

I would say, try harder. The exception you have here is most probably because the user has not these grants.

See the stack trace in the FAQ for a reference [1]

Moreover, if this is working fine with H2 and postgres and not with Oracle with this exception, chances are very high this is related to these grants. We had the same problem too with the exact same environment (postgres, h2, oracle).

S

[1] http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisBTM12refusingtostartwhenconfiguredwithOraclewhile11worksfine

On Tue, Feb 21, 2012 at 6:09 PM, Douglas Ferguson <[hidden email]> wrote:
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
       at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
       ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
       at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
       ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
       ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
       ... 42 more
Caused by: javax.transaction.xa.XAException
       at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
       ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beans won't load on oracle

Ludovic Orban-2
Here is what I found the latest Oracle driver tries to do when asked to recover:

BEGIN sys.dbms_xa.dist_txn_sync
END;

if that fails, it does instead:

BEGIN sys.dbms_system.dist_txn_sync(0)
END;

and then:

SELECT formatid, globalid, branchid FROM SYS.DBA_PENDING_TRANSACTIONS


Please try to execute those statements manually and see what happens.


2012/2/22 Douglas Ferguson <[hidden email]>
I ran those grants on the older 10G db and the newer 11G db I granded to sys.dbms_xa instead.

Yes I verified the user had the grants by running a select

I  upgraded to the latest java 1.6 oracle drivers from oracle's website.  ojdbc6.jar which is the 11G driver.
Previously we are running ojdbc14.jar which are the 10G drivers.

Douglas

On Feb 22, 2012, at 7:48 AM, Ludovic Orban wrote:

Just to make sure: you got the following grants executed, right?

grant select on sys.dba_pending_transactions to <pool_user>;
grant select on sys.pending_trans$ to <pool_user>;
grant select on sys.dba_2pc_pending to <pool_user>;
grant execute on sys.dbms_system to <pool_user>;

What happens when you manually log on Oracle with your connection pool's account and try select * from sys.dba_pending_transactions ?

Could you please also post your exact Oracle server version and JDBC driver version?


2012/2/22 Douglas Ferguson <[hidden email]>
We added the grants and still no dice.

I tried this one 3 different environments with 2 different oracle versions.

Douglas

On Feb 22, 2012, at 12:24 AM, Stephane Nicoll wrote:

I would say, try harder. The exception you have here is most probably because the user has not these grants.

See the stack trace in the FAQ for a reference [1]

Moreover, if this is working fine with H2 and postgres and not with Oracle with this exception, chances are very high this is related to these grants. We had the same problem too with the exact same environment (postgres, h2, oracle).

S

[1] http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisBTM12refusingtostartwhenconfiguredwithOraclewhile11worksfine

On Tue, Feb 21, 2012 at 6:09 PM, Douglas Ferguson <[hidden email]> wrote:
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
       at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
       ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
       at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
       ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
       ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
       ... 42 more
Caused by: javax.transaction.xa.XAException
       at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
       ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email







Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beans won't load on oracle

Douglas Ferguson-3
Hmm..

Sqlplus doesn't seem to be happy with me running those commands.

SQL> BEGIN sys.dbms_xa.dist_txn_sync
END;  2  
  3  
  4  
  5  
  6  /
END;
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
:= . ( @ % ;


SQL> BEGIN sys.dbms_system.dist_txn_sync(0)
END;
  2    3  
  4  
  5  
  6  /
END;
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
:= . ( % ;
The symbol ";" was substituted for "END" to continue.


SQL> SELECT formatid, globalid, branchid FROM SYS.DBA_PENDING_TRANSACTIONS
  2  ;

no rows selected



On Feb 22, 2012, at 8:37 AM, Ludovic Orban wrote:

Here is what I found the latest Oracle driver tries to do when asked to recover:

BEGIN sys.dbms_xa.dist_txn_sync
END;

if that fails, it does instead:

BEGIN sys.dbms_system.dist_txn_sync(0)
END;

and then:

SELECT formatid, globalid, branchid FROM SYS.DBA_PENDING_TRANSACTIONS


Please try to execute those statements manually and see what happens.


2012/2/22 Douglas Ferguson <[hidden email]>
I ran those grants on the older 10G db and the newer 11G db I granded to sys.dbms_xa instead.

Yes I verified the user had the grants by running a select

I  upgraded to the latest java 1.6 oracle drivers from oracle's website.  ojdbc6.jar which is the 11G driver.
Previously we are running ojdbc14.jar which are the 10G drivers.

Douglas

On Feb 22, 2012, at 7:48 AM, Ludovic Orban wrote:

Just to make sure: you got the following grants executed, right?

grant select on sys.dba_pending_transactions to <pool_user>;
grant select on sys.pending_trans$ to <pool_user>;
grant select on sys.dba_2pc_pending to <pool_user>;
grant execute on sys.dbms_system to <pool_user>;

What happens when you manually log on Oracle with your connection pool's account and try select * from sys.dba_pending_transactions ?

Could you please also post your exact Oracle server version and JDBC driver version?


2012/2/22 Douglas Ferguson <[hidden email]>
We added the grants and still no dice.

I tried this one 3 different environments with 2 different oracle versions.

Douglas

On Feb 22, 2012, at 12:24 AM, Stephane Nicoll wrote:

I would say, try harder. The exception you have here is most probably because the user has not these grants.

See the stack trace in the FAQ for a reference [1]

Moreover, if this is working fine with H2 and postgres and not with Oracle with this exception, chances are very high this is related to these grants. We had the same problem too with the exact same environment (postgres, h2, oracle).

S

[1] http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisBTM12refusingtostartwhenconfiguredwithOraclewhile11worksfine

On Tue, Feb 21, 2012 at 6:09 PM, Douglas Ferguson <[hidden email]> wrote:
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
       at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
       ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
       at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
       ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
       ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
       ... 42 more
Caused by: javax.transaction.xa.XAException
       at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
       ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email








Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Beans won't load on oracle

Ludovic Orban-2
Get them executed via the JDBC driver, using some pre-made java tool or by writing a simple client app yourself.


The exact statement strings are:

BEGIN sys.dbms_xa.dist_txn_sync \n; END;

BEGIN sys.dbms_system.dist_txn_sync(0) \n; END;

SELECT formatid, globalid, branchid FROM SYS.DBA_PENDING_TRANSACTIONS


If that doesn't work, then there's definitely something wrong on your side as the JDBC driver contains instruction that your DB does not understand.


2012/2/22 Douglas Ferguson <[hidden email]>
Hmm..

Sqlplus doesn't seem to be happy with me running those commands.

SQL> BEGIN sys.dbms_xa.dist_txn_sync
END;  2  
  3  
  4  
  5  
  6  /
END;
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
:= . ( @ % ;


SQL> BEGIN sys.dbms_system.dist_txn_sync(0)
END;
  2    3  
  4  
  5  
  6  /
END;
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
:= . ( % ;
The symbol ";" was substituted for "END" to continue.


SQL> SELECT formatid, globalid, branchid FROM SYS.DBA_PENDING_TRANSACTIONS
  2  ;

no rows selected



On Feb 22, 2012, at 8:37 AM, Ludovic Orban wrote:

Here is what I found the latest Oracle driver tries to do when asked to recover:

BEGIN sys.dbms_xa.dist_txn_sync
END;

if that fails, it does instead:

BEGIN sys.dbms_system.dist_txn_sync(0)
END;

and then:

SELECT formatid, globalid, branchid FROM SYS.DBA_PENDING_TRANSACTIONS


Please try to execute those statements manually and see what happens.


2012/2/22 Douglas Ferguson <[hidden email]>
I ran those grants on the older 10G db and the newer 11G db I granded to sys.dbms_xa instead.

Yes I verified the user had the grants by running a select

I  upgraded to the latest java 1.6 oracle drivers from oracle's website.  ojdbc6.jar which is the 11G driver.
Previously we are running ojdbc14.jar which are the 10G drivers.

Douglas

On Feb 22, 2012, at 7:48 AM, Ludovic Orban wrote:

Just to make sure: you got the following grants executed, right?

grant select on sys.dba_pending_transactions to <pool_user>;
grant select on sys.pending_trans$ to <pool_user>;
grant select on sys.dba_2pc_pending to <pool_user>;
grant execute on sys.dbms_system to <pool_user>;

What happens when you manually log on Oracle with your connection pool's account and try select * from sys.dba_pending_transactions ?

Could you please also post your exact Oracle server version and JDBC driver version?


2012/2/22 Douglas Ferguson <[hidden email]>
We added the grants and still no dice.

I tried this one 3 different environments with 2 different oracle versions.

Douglas

On Feb 22, 2012, at 12:24 AM, Stephane Nicoll wrote:

I would say, try harder. The exception you have here is most probably because the user has not these grants.

See the stack trace in the FAQ for a reference [1]

Moreover, if this is working fine with H2 and postgres and not with Oracle with this exception, chances are very high this is related to these grants. We had the same problem too with the exact same environment (postgres, h2, oracle).

S

[1] http://docs.codehaus.org/display/BTM/FAQ#FAQ-WhyisBTM12refusingtostartwhenconfiguredwithOraclewhile11worksfine

On Tue, Feb 21, 2012 at 6:09 PM, Douglas Ferguson <[hidden email]> wrote:
So I've got this working on H2 and Postgres but on oracle, I get the error below.

I've tried adding the 4 grants, for the user that the app is using to connect to the db.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [spring/liquibaseContext.xml]: Invocation of init method failed; nested exception is org.hibernate.JDBCException: Error updating database
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at com.xxxx.spring.config.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:19)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
       at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
       at org.apache.catalina.core.StandardService.start(StandardService.java:516)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.JDBCException: Error updating database
       at com.xxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:288)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
       ... 37 more
Caused by: java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource xaDataSource with 5 connection(s) (5 still available) -failed-
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:252)
       at com.xxxx.db.liquibase.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:280)
       ... 39 more
Caused by: bitronix.tm.internal.BitronixRuntimeException: incremental recovery failed when trying to acquire a connection from failed resource 'xaDataSource'
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:109)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
       at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248)
       ... 40 more
Caused by: bitronix.tm.recovery.RecoveryException: failed recovering resource xaDataSource
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:104)
       at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
       ... 42 more
Caused by: javax.transaction.xa.XAException
       at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
       at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
       at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
       ... 43 more
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email









Loading...