Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
benj amin
How to use an Oracle RAC database?
31 agosto 2009 8.55
Risposta

benj amin

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 31 agosto 2009

Messaggi recenti

Hi everybody,

We've installed Liferay on a Tomcat cluster and are trying to change our Liferay database to Oracle RAC. No problem while using one server but:
How to configure access to an Oracle RAC 10g database in portal-ext.properties with loadbalancing and failover on?

We tried:

1jdbc.default.driverClassName=oracle.jdbc.OracleDriver
2jdbc.default.url=jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=hostname1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=hostname2)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=SID)))
3jdbc.d]efault.username=lportal
4jdbc.default.password=lportal


but it's not the right way to do...

It works with something like this:
1jdbc.default.url=jdbc:oracle:thin:@hostname1:1521:SID

but it only use one node of the RAC... and don't use failover and load balancing... That's not what we want...

Thx for your help!
Luis García
RE: How to use an Oracle RAC database?
24 settembre 2009 3.24
Risposta

Luis García

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 24 settembre 2009

Messaggi recenti

Hi,

Please, read "Using High Availability and Fast Connection Failover" section of that document

You will find valid URL connection configurations

Bye!
Eric Dobbs
RE: How to use an Oracle RAC database?
13 maggio 2010 11.52
Risposta

Eric Dobbs

Punteggio: New Member

Messaggi: 17

Data di Iscrizione: 30 marzo 2010

Messaggi recenti

I had the same problem. I resolved it this way.

1
2jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
3jdbc.default.url=jdbc:oracle:thin:uid/pswd@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST = your.hostname.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = your.hostname.com)(PORT = 1521))(LOAD_BALANCE = yes))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SID)(FAILOVER_MODE = (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))
4jdbc.default.username=uid
5jdbc.default.password=pswd
6hibernate.dialect=org.hibernate.dialect.Oracle10gDialect



I hope this helps someone else
Palani Venkat
RE: How to use an Oracle RAC database?
10 dicembre 2010 6.57
Risposta

Palani Venkat

Punteggio: Junior Member

Messaggi: 32

Data di Iscrizione: 10 novembre 2010

Messaggi recenti

Hi Eric,

I have given the oracle connection information as you mentioned in portal-ext.properties but im getting the following error . Could you pls help us in solving the issue.

Thanks in advance...

my portal-ext.properties file info
--------------------------------


jdbc.default.jndi.name=jdbc/LiferayPool


#
# Hypersonic
#
#jdbc.default.driverClassName=org.hsqldb.jdbcDriver
#jdbc.default.url=jdbc:hsqldb:${liferay.home}/data/hsql/lportal
#jdbc.default.username=
#jdbc.default.password=


jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.default.url=jdbc:oracle:thin:uid/pwd@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))(LOAD_BALANCE = yes))(CONNECT_DATA =

(SERVER = DEDICATED) (SERVICE_NAME = sid (FAILOVER_MODE = (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5)))))
jdbc.default.username=uid
jdbc.default.password=pwd
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect


Error in console
------------------

Loading file:/D:/portal/liferay-portal-6.0-ee/tomcat-6.0.29/webapps/ROOT/WEB-INF
/classes/portal-ext.properties
14:46:24,360 ERROR [DataSourceFactoryBean:74] Unable to lookup jdbc/LiferayPool
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.liferay.portal.kernel.jndi.JNDIUtil._lookup(JNDIUtil.java:158)
at com.liferay.portal.kernel.jndi.JNDIUtil.lookup(JNDIUtil.java:54)
at com.liferay.portal.kernel.jndi.JNDIUtil.lookup(JNDIUtil.java:36)
at com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean.createInstance
(DataSourceFactoryBean.java:70)
at com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean.createInstance
(DataSourceFactoryBean.java:46)
at org.springframework.beans.factory.config.AbstractFactoryBean.afterPro
pertiesSet(AbstractFactoryBean.java:130)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveInnerBean(BeanDefinitionValueResolver.java:270)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveReference(BeanDefinitionValueResolver.java:322)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.ConstructorResolver.resolve
ConstructorArguments(ConstructorResolver.java:621)
at org.springframework.beans.factory.support.ConstructorResolver.instant
iateUsingFactoryMethod(ConstructorResolver.java:431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:97
3)
factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveReference(BeanDefinitionValueResolver.java:322)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveReference(BeanDefinitionValueResolver.java:322)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Manish Kumar Gupta
RE: How to use an Oracle RAC database?
10 dicembre 2010 8.07
Risposta

Manish Kumar Gupta

LIFERAY STAFF

Punteggio: Liferay Master

Messaggi: 535

Data di Iscrizione: 15 maggio 2008

Messaggi recenti

Palani,

try by removing jdbc.default.jndi.name=jdbc/LiferayPool from portal-ext.properties.

You should either use above property or provide connection parameter and not both.

Since you are not creating connection pool, remove above property.
Palani Venkat
RE: How to use an Oracle RAC database?
12 dicembre 2010 20.14
Risposta

Palani Venkat

Punteggio: Junior Member

Messaggi: 32

Data di Iscrizione: 10 novembre 2010

Messaggi recenti

Hi Manish,


Thanks for your help.

I have removed the line jdbc.default.jndi.name=jdbc/LiferayPool as you mentioned but im getting the following eror and i want to let you know i didn't make any changes in ROOT.xml file. Did i need to make changes in ROOT.xml file ?


03:40:41,537 WARN [BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicRes
ourcePool$AcquireTask@5fcfad77 -- Acquisition Attempt Failed!!! Clearing pending
acquires. While trying to acquire a needed new resource, we failed to succeed m
ore than the maximum number of allowed acquisition attempts (30). Last acquisiti
on attempt exception:
java.sql.SQLException: Io exception: NL Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:113)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:147)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:257)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:389)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
454)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
n.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:802)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicRe
sourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:547)
03:40:41,568 WARN [BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicRes
ourcePool$AcquireTask@70e8fdc9 -- Acquisition Attempt Failed!!! Clearing pending
acquires. While trying to acquire a needed new resource, we failed to succeed m
ore than the maximum number of allowed acquisition attempts (30). Last acquisiti
on attempt exception:
java.sql.SQLException: Io exception: NL Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:113)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:147)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:257)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:389)
Uday K
RE: How to use an Oracle RAC database?
3 ottobre 2011 1.04
Risposta

Uday K

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 3 ottobre 2011

Messaggi recenti

I too tried to connect to Oracle database,but getting the following error:

Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
... 111 more
07:56:47,343 ERROR [PortalHibernateConfiguration:116] java.lang.RuntimeException: No dialect found
java.lang.RuntimeException: No dialect found
at com.liferay.portal.spring.hibernate.DialectDetector.getDialect(DialectDetector.java:141)
at com.liferay.portal.spring.hibernate.DialectDetector.determineDialect(DialectDetector.java:49)
at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.determineDialect(PortalHibernateConfiguration.java:70)
at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.newConfiguration(PortalHibernateConfiguration.java:102)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:549)
at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.buildSessionFactory(PortalHibernateConfiguration.java:60)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

07:56:47,390 WARN [BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1539d49 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
07:56:47,375 WARN [BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1135cd9 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
07:56:47,375 WARN [BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@15c44d6 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Uday K
RE: How to use an Oracle RAC database?
3 ottobre 2011 1.06
Risposta

Uday K

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 3 ottobre 2011

Messaggi recenti

Hi All,

Please help me on the above error..

Thank you,
Uday
andreas kehl
RE: How to use an Oracle RAC database?
3 gennaio 2012 3.10
Risposta

andreas kehl

Punteggio: New Member

Messaggi: 13

Data di Iscrizione: 30 luglio 2008

Messaggi recenti

Uday K:
I too tried to connect to Oracle database,but getting the following error:

07:56:47,343 ERROR [PortalHibernateConfiguration:116] java.lang.RuntimeException: No dialect found
java.lang.RuntimeException: No dialect found
at com.liferay.portal.spring.hibernate.DialectDetector.getDialect(DialectDetector.java:141)



did you add that property to portal-ext.properties?

hibernate.dialect=org.hibernate.dialect.Oracle10gDialect