2 zyssnh51390 zyssnh51390 于 2013.12.20 09:36 提问

Quartz+Spring+Hibernate集群环境下 ClusterManager: Error managing cluster: null

[2013-12-19 14:43:44] [ERROR] QuartzScheduler_quartzScheduler-NON_CLUSTERED_ClusterManager) - ClusterManager: Error managing cluster: null
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy28.rollback(Unknown Source)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:3588)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3199)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3798)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3834)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:71)
... 5 more
Caused by: java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3450)
at com.jolbox.bonecp.ConnectionHandle.rollback(ConnectionHandle.java:958)
... 10 more

##========================#
quartz.properties配置如下:
##==========================

#Configure Main Scheduler Properties

##==========================
org.quartz.scheduler.instanceName = quartzScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.wrapJobExecutionInUserTransaction = false

##=========================

#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.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.maxMisfiresToHandleAtATime=10
org.quartz.jobStore.isClustered = true
org.quartz.jobStore.clusterCheckinInterval = 15000

#============================#
applicationContext-quartz-server.xml配置:
#============================#

     <bean id="quartzDataSource" class="org.apache.commons.dbcp.BasicDataSource"
    destroy-method="close">
          <property name="driverClassName">
        <value>${jdbc.driverClassName}</value>
    </property>
    <property name="url">
        <value>${jdbc.url}</value>
    </property>
    <property name="username">
        <value>${jdbc.username}</value>
    </property>
    <property name="password">
        <value>${jdbc.password}</value>
    </property>
    <property name="maxActive" value="5"></property>
    <property name="maxIdle" value="20"></property>
    <property name="maxWait" value="50"></property>
    <property name="defaultAutoCommit" value="true"></property>
</bean>



<bean name="quartzScheduler"
    class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    <property name="dataSource" ref="quartzDataSource" />
    <property name="applicationContextSchedulerContextKey" value="applicationContextKey" />
    <property name="configLocation" value="classpath:config/quartz.properties" />
    <property name="triggers">
        <list>
            <ref bean="Trigger1" />
            <ref bean="Trigger2" />
            <ref bean="Trigger3" />
            <ref bean="Trigger4"/>
        </list>
    </property>
</bean>

四台机器集群,不压力测试没问题,压力测试就出现以上错误,求大神帮忙解决啊!
quartz-all-1.6.6.jar

Csdn user default icon
上传中...
上传图片
插入图片