<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Getting "A ResourcePool could not acquire a resource from its primary factory or source.""]]></title>
		<link>http://forums.terracotta.org/forums/posts/list/17.page</link>
		<description><![CDATA[Latest messages posted in the topic "Getting "A ResourcePool could not acquire a resource from its primary factory or source.""]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Getting &quot;A ResourcePool could not acquire a resource from its primary factory or source.&quot;</title>
				<description><![CDATA[ I tried to set up JobStore with Oracle, but getting "A ResourcePool could not acquire a resource from its primary factory or source.":

[5/22/12 17:59:36:441 GMT] 00000015 SystemErr     R 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)
	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
	at org.quartz.utils.PoolingConnectionProvider.getConnection(PoolingConnectionProvider.java:248)
	at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:108)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:723)
	at org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:69)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3721)
	at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3655)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1007)
	at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:826)
	at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:250)


Here is the quartz.properties I used:
#============================================================================
# Configure Main Scheduler Properties  
#============================================================================

org.quartz.scheduler.instanceName = RatesQuartzScheduler
org.quartz.scheduler.instanceId = AUTO


#============================================================================
# Configure ThreadPool  
#============================================================================

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 10
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true


#============================================================================
# Configure JobStore  
#============================================================================

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
org.quartz.jobStore.dataSource = qzDS
org.quartz.jobStore.isClustered = true

#============================================================================
# Configure Datasources  
#============================================================================

org.quartz.dataSource.qzDS.driver = oracle.jdbc.driver.OracleDriver
org.quartz.dataSource.qzDS.URL = jdbc:oracle:thin:@//10.21.12.159:1521/NDSINT
org.quartz.dataSource.qzDS.user = app
org.quartz.dataSource.qzDS.password = app_int
org.quartz.dataSource.qzDS.maxConnections = 30    

I was able to make a DB connection in a simple Java app by using the same connection strings, but it failed when I tried to start up my server app (the start-up bean starts quartz scheduler and then tries to schedule a job).

Any idea?

Thanks in advance for any help.

-Steve]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7036.page#35091</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7036.page#35091</link>
				<pubDate><![CDATA[Tue, 22 May 2012 11:35:36]]> GMT</pubDate>
				<author><![CDATA[ hacah]]></author>
			</item>
			<item>
				<title>Re:Getting &quot;A ResourcePool could not acquire a resource from its primary factory or source.&quot;</title>
				<description><![CDATA[ Is there no further exception or information?

If the very same connection settings work elsewhere it's hard to imagine what's wrong.
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7036.page#35106</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7036.page#35106</link>
				<pubDate><![CDATA[Wed, 23 May 2012 11:50:04]]> GMT</pubDate>
				<author><![CDATA[ jhouse]]></author>
			</item>
			<item>
				<title>Getting &quot;A ResourcePool could not acquire a resource from its primary factory or source.&quot;</title>
				<description><![CDATA[ Thank you for your reply. Earlier today I found a previous post on this forum (http://forums.terracotta.org/forums/posts/list/5460.page) that helped me. I had to downgrade c3p0-0.9.1.1.jar to c3p0-0.9.0.4.jar to solve the issue.

But now I am getting an exception "Failure obtaining db row lock: ORA-00942: table or view does not exist", even though all 11 tables required by Quartz Scheduler have been created. Do you know which table(s) the scheduler  was trying to access when schedule a new job?

[5/23/12 14:34:56:632 GMT] 00000026 SystemErr     R 	at java.lang.Thread.run(Thread.java:801)
[5/23/12 14:34:56:975 GMT] 00000026 SystemOut     O Failure obtaining db row lock: ORA-00942: table or view does not exist

[5/23/12 14:34:57:006 GMT] 00000026 ApplicationMg A   WSVR0221I: Application started: RatesEAR
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
 [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
]
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:115)
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:117)
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3724)
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90)
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3655)
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1007)
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:826)
[5/23/12 14:34:56:975 GMT] 00000026 SystemErr     R 	at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:250)]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7036.page#35107</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7036.page#35107</link>
				<pubDate><![CDATA[Wed, 23 May 2012 11:57:11]]> GMT</pubDate>
				<author><![CDATA[ hacah]]></author>
			</item>
			<item>
				<title>Getting &quot;A ResourcePool could not acquire a resource from its primary factory or source.&quot;</title>
				<description><![CDATA[ It looks like the user id I used is incorrect. It has access to the Quartz tables (which were created in a separate schema called Quartz), but by default the user ID used points to another schema. I believe this has caused the table-not-exist exception.]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7036.page#35108</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7036.page#35108</link>
				<pubDate><![CDATA[Wed, 23 May 2012 12:11:52]]> GMT</pubDate>
				<author><![CDATA[ hacah]]></author>
			</item>
	</channel>
</rss>