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
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).
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)
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.