我怎样才能避免运行quartz scheduler.start()时收到的异常

时间:2013-02-22 07:12:52

标签: java java-ee

我在运行quartz schedular.start()时遇到了一些异常。我正在使用DB2数据库,我也在使用DB2java.jar和DB2Jcc.jar.My应用程序是一个简单的Java Standalone应用程序并尝试使用Quartz运行schedular.I已完成所有必需的设置..但仍然得到以下例外.. 例外情况如下:

Starting scheduler...
[INFO   ] [2013-02-22 12:38:14,237] [main           ] Initializing scheduler.
[INFO   ] [2013-02-22 12:38:14,628] [main           ] MLog clients using log4j logging.
[INFO   ] [2013-02-22 12:38:15,581] [main           ] Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10]
[DEBUG  ] [2013-02-22 12:38:15,737] [main           ] MBean: com.mchange.v2.c3p0:type=PooledDataSource[2zlqav8t7atpi1xeubjp|6b416b41] registered.
[INFO   ] [2013-02-22 12:38:15,862] [main           ] Using default implementation for ThreadExecutor
[INFO   ] [2013-02-22 12:38:15,972] [main           ] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[INFO   ] [2013-02-22 12:38:15,987] [main           ] Quartz Scheduler v.2.1.6 created.
[INFO   ] [2013-02-22 12:38:15,987] [main           ] Registering Quartz Job Initialization Plug-in.
[INFO   ] [2013-02-22 12:38:15,987] [main           ] Registering Quartz shutdown hook.
[INFO   ] [2013-02-22 12:38:15,987] [main           ] Using db table-based data access locking (synchronization).
[INFO   ] [2013-02-22 12:38:16,003] [main           ] JobStoreTX initialized.
[INFO   ] [2013-02-22 12:38:16,003] [main           ] Scheduler meta-data: Quartz Scheduler (v2.1.6) 'ap_preprocess_scheduler' with instanceId 'WW973D48906A1361516895893'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 5 threads.
  Using job-store 'org.quartz.impl.jdbcjobstore.JobStoreTX' - which supports persistence. and is clustered.
[INFO   ] [2013-02-22 12:38:16,003] [main           ] Quartz scheduler 'ap_preprocess_scheduler' initialized from default resource file in Quartz package: 'quartz.properties'
[INFO   ] [2013-02-22 12:38:16,003] [main           ] Quartz scheduler version: 2.1.6
[INFO   ] [2013-02-22 12:38:16,003] [main           ] Starting scheduler.
[DEBUG  ] [2013-02-22 12:38:16,284] [main           ] incremented pending_acquires: 1
[DEBUG  ] [2013-02-22 12:38:16,284] [main           ] incremented pending_acquires: 2
[DEBUG  ] [2013-02-22 12:38:16,284] [main           ] incremented pending_acquires: 3
[DEBUG  ] [2013-02-22 12:38:16,284] [main           ] com.mchange.v2.resourcepool.BasicResourcePool@dca0dca config: [start -> 3; min -> 1; max -> 5; inc -> 3; num_acq_attempts -> 30; acq_attempt_delay -> 1000; check_idle_resources_delay -> 0; mox_resource_age -> 0; max_idle_time -> 0; excess_max_idle_time -> 0; destroy_unreturned_resc_time -> 0; expiration_enforcement_delay -> 0; break_on_acquisition_failure -> false; debug_store_checkout_exceptions -> false]
[INFO   ] [2013-02-22 12:38:16,284] [main           ] Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 2zlqav8t7atpi1xeubjp|6b416b41, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> COM.ibm.db2.jdbc.app.DB2Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2zlqav8t7atpi1xeubjp|6b416b41, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:db2:DBVPADEV, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 5, maxStatements -> 0, maxStatementsPerConnection -> 120, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
[DEBUG  ] [2013-02-22 12:38:16,284] [main           ] acquire test -- pool size: 0; target_pool_size: 3; desired target? 1
[DEBUG  ] [2013-02-22 12:38:16,284] [main           ] awaitAvailable(): [unknown]
[DEBUG  ] [2013-02-22 12:38:16,284] [main           ] trace com.mchange.v2.resourcepool.BasicResourcePool@dca0dca [managed: 0, unused: 0, excluded: 0]
[DEBUG  ] [2013-02-22 12:38:16,987] [Thread-5       ] Checking for available updated version of Quartz...
[DEBUG  ] [2013-02-22 12:38:17,753] [Thread-5       ] Quartz version update check failed: www.terracotta.org
[DEBUG  ] [2013-02-22 12:38:21,065] [r$PoolThread-#0] decremented pending_acquires: 2
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" java.lang.AbstractMethodError: java/sql/Connection.getHoldability()I
    at com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:106)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
    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)
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" java.lang.AbstractMethodError: java/sql/Connection.getHoldability()I
    at com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:106)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
[DEBUG  ] [2013-02-22 12:38:22,550] [r$PoolThread-#2] decremented pending_acquires: 1

    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)

[DEBUG  ] [2013-02-22 12:38:24,050] [r$PoolThread-#1] decremented pending_acquires: 0
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" java.lang.AbstractMethodError: java/sql/Connection.getHoldability()I
    at com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:106)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
    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)

请帮帮我.. 问候, Pritam

1 个答案:

答案 0 :(得分:0)

似乎是不正确的JDBC版本。 你使用的是什么版本的jdbc?请尝试另外一个。