« Return to Thread: Beans won't load on oracle

Re: Beans won't load on oracle

by Douglas Ferguson-3 :: Rate this Message:

| View in Thread

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 <thedug@...> 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




 « Return to Thread: Beans won't load on oracle