-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How do you config DB connection pool with C3p0 for Oracle?
PostPosted: Mon May 21, 2007 11:24 am 
Newbie

Joined: Wed May 02, 2007 11:53 am
Posts: 3
Hi, friends:

I have problems in using c3p0 connection pool with Oracle. Below shows how I put the configuration and what the exception I got. Basically, can c3p0 be used for Oracle? Is it because my configuration is wrong? Besides, why can't we use Oracle its own connection pool? If yes, how can we configure it? Thanks a lot!

[b]Hibernate version:[/b]
v3
[b]Mapping documents:[/b]
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@xxx:1521:xxx</property>
<property name="connection.username">xxx</property>
<property name="connection.password">xxx</property>
<!-- configuration pool via c3p0-->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">100</property> <!-- seconds -->
<property name="c3p0.max_size">100</property>
<property name="c3p0.max_statements">0</property>
<property name="c3p0.min_size">10</property>
<property name="c3p0.timeout">100</property> <!-- seconds -->
[b]Code between sessionFactory.openSession() and session.close():[/b]

[b]Full stack trace of any exception that occurs:[/b]
11:17:02,244 INFO C3P0ConnectionProvider:50 - C3P0 using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@10.1.24.51:1521:regd01
11:17:02,244 INFO C3P0ConnectionProvider:51 - Connection properties: {user=regadm, password=****}
11:17:02,244 INFO C3P0ConnectionProvider:54 - autocommit mode: false
11:17:02,306 INFO MLog:80 - MLog clients using log4j logging.
11:17:03,165 INFO C3P0Registry:204 - Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10]
11:17:03,212 INFO AbstractPoolBackedDataSource:462 - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@e9c065ec [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@5eee37ba [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2ry4hr7m1cm5h2l1vpv9u|68825e5f, idleConnectionTestPeriod -> 100, initialPoolSize -> 10, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 100, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@9ba11edc [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 2ry4hr7m1cm5h2l1vpv9u|3be91e59, jdbcUrl -> jdbc:oracle:thin:@xxx:1521:xxxx, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, factoryClassLocation -> null, identityToken -> 2ry4hr7m1cm5h2l1vpv9u|27c65e58, numHelperThreads -> 3 ]
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 1
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 2
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 3
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 4
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 5
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 6
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 7
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 8
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 9
11:17:03,228 DEBUG BasicResourcePool:404 - incremented pending_acquires: 10
11:17:03,228 DEBUG BasicResourcePool:289 - com.mchange.v2.resourcepool.BasicResourcePool@639a1e5f config: [start -> 10; min -> 10; max -> 100; inc -> 1; num_acq_attempts -> 30; acq_attempt_delay -> 1000; check_idle_resources_delay -> 100000; mox_resource_age -> 0; max_idle_time -> 100000; excess_max_idle_time -> 0; destroy_unreturned_resc_time -> 0; expiration_enforcement_delay -> 25000; break_on_acquisition_failure -> false; debug_store_checkout_exceptions -> false]
11:17:03,228 DEBUG BasicResourcePool:538 - acquire test -- pool size: 0; target_pool_size: 10; desired target? 1
11:17:03,228 DEBUG BasicResourcePool:1291 - awaitAvailable(): [unknown]
11:17:03,244 DEBUG BasicResourcePool:1644 - trace com.mchange.v2.resourcepool.BasicResourcePool@639a1e5f [managed: 0, unused: 0, excluded: 0]
11:17:03,806 DEBUG BasicResourcePool:1831 -[b] An exception occurred while acquiring a poolable resource. Will retry.
java.sql.SQLException: Unsupported feature[/b]

[b]Name and version of the database you are using:[/b]
Oracle 9i & 10g


Top
 Profile  
 
 Post subject: c3p0 and Oracle
PostPosted: Mon May 21, 2007 3:19 pm 
Newbie

Joined: Thu Jul 13, 2006 8:19 pm
Posts: 3
Hi,

I'm using c3p0 to pool db connections for Hibernate on Oracle with no problems.

At first I tried with all the configuration properties listed here -> http://www.hibernate.org/214.html

But I got strange errors, I think perhaps Oracle doesn't like some of those properties.

See if you can get a connection established using just the bare minimum: connection url, name, password, driver class.

hth


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 22, 2007 9:16 am 
Newbie

Joined: Wed May 02, 2007 11:53 am
Posts: 3
Using Oracle 10g JDBC driver solved my problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.