ITPUB??ì3
ITPUB论坛 » Java企业开发 » 关于spring集成quartz的问题,运行错误提示!!!!!!!


标题: 关于spring集成quartz的问题,运行错误提示!!!!!!!
离线 cayman811
高级会员



精华贴数 3
个人空间 0
技术积分 7975 (154)
社区积分 6 (14274)
注册日期 2006-8-9
论坛徽章:5
开发板块每日发贴之星开发板块每日发贴之星ITPUB新首页上线纪念徽章   
      

发表于 2008-7-7 13:27 
关于spring集成quartz的问题,运行错误提示!!!!!!!

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.scheduling.quartz.SchedulerFactoryBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.quartz.JobPersistenceException: Unexpected runtime exception: Job class must implement the Job interface. [See nested exception: java.lang.IllegalArgumentException: Job class must implement the Job interface.]
Caused by: org.quartz.JobPersistenceException: Unexpected runtime exception: Job class must implement the Job interface. [See nested exception: java.lang.IllegalArgumentException: Job class must implement the Job interface.] at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3681)


配置文件为:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

<!-- <bean id="tjob" class="com.test.quartz.TestJob"> </bean>-->
<!--job-->
<bean id="job"
class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>com.test.quartz.TestJob </value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="timeout">
<value>5 </value>
</entry>
</map>
</property>
</bean>

<!-- <bean id="job"-->
<!-- class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">-->
<!-- <property name="targetObject" ref="tjob"> </property>-->
<!-- <property name="targetMethod">-->
<!-- <value>print </value>-->
<!-- </property>-->
<!-- <property name="concurrent" value="false"> </property>-->
<!-- <property name="jobDataAsMap">-->
<!-- <map>-->
<!-- <entry key="timeout">-->
<!-- <value>5 </value>-->
<!-- </entry>-->
<!-- </map>-->
<!-- </property>-->
<!-- </bean>-->

<!--tigger -->
<bean id="crontigger"
class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="job"> </property>
<property name="cronExpression">
<value>* 4,5,6,7 15 * * ? </value>
</property>
</bean>

<!--scheduling -->
<bean autowire="no" lazy-init="false"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="crontigger" />
</list>
</property>
<property name="quartzProperties">
<props>
<prop key="org.quartz.threadPool.class">
org.quartz.simpl.SimpleThreadPool
</prop>
<prop key="org.quartz.threadPool.threadCount">10 </prop>
<prop key="org.quartz.threadPool.class">
org.quartz.simpl.SimpleThreadPool
</prop>
<prop key="org.quartz.threadPool.threadPriority">
5
</prop>
<prop
key="org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread">
true
</prop>
<prop key="org.quartz.threadPool.threadCount">10 </prop>

<prop key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreTX </prop>
<prop key="org.quartz.jobStore.tablePrefix">QRTZ_ </prop>
<prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.StdJDBCDelegate </prop>
<prop key="org.quartz.jobStore.dataSource">qzDS </prop>

<prop key="org.quartz.dataSource.qzDS.driver">com.mysql.jdbc.Driver </prop>
<prop key="org.quartz.dataSource.qzDS.URL">jdbc:mysql://localhost:3306/qrtz </prop>
<prop key="org.quartz.dataSource.qzDS.user">root </prop>
<prop key="org.quartz.dataSource.qzDS.password">root </prop>
<prop key="org.quartz.dataSource.qzDS.maxConnections">30 </prop>

</props>
</property>
<!-- <property name="configLocation"-->
<!-- value="/WEB-INF/quartz.properties">-->
<!-- </property>-->
</bean>
</beans>


哪位大哥能帮助下小弟,这几天一直都被任务的持久化困惑着!!!!


只看该作者    顶部
离线 cyntha80
中级会员



精华贴数 1
个人空间 0
技术积分 3967 (350)
社区积分 2 (29984)
注册日期 2007-2-8
论坛徽章:20
开发板块每日发贴之星生肖徽章2007版:鼠生肖徽章2007版:鼠生肖徽章2007版:鼠生肖徽章2007版:鼠生肖徽章2007版:鼠
生肖徽章2007版:鼠生肖徽章2007版:鼠生肖徽章2007版:鼠生肖徽章2007版:鼠生肖徽章2007版:鼠生肖徽章2007版:鼠

发表于 2008-7-7 13:27 
关注中~~~


只看该作者    顶部
离线 justforregister
SAP


精华贴数 1
个人空间 10
技术积分 38458 (19)
社区积分 9928 (153)
注册日期 2005-6-10
论坛徽章:244
现任管理团队成员ITPUB元老奥运纪念徽章NBA2008季后赛纪念徽章欧洲冠军杯纪念徽章NBA常规赛纪念章
管理团队2007贡献徽章参与2007年甲骨文全球大会(中国上海)纪念ITPUB北京香山2007年会纪念徽章2008北京奥运纪念徽章:排球2008北京奥运纪念徽章:跳水2008北京奥运纪念徽章:摔跤

发表于 2008-7-8 00:21 
错误说的很明显啊


__________________
Go to Hell
大家一起BS以下菠菜作弊者

| EPS2008          |        35201 | 2008-08-17 22:18:17     |
| missingsky       |        22300 | 2008-08-17 22:19:17     |
| wws8875          |        10000 | 2008-08-17 22:25:54     |
| renxiang         |        23332 | 2008-08-17 22:28:15     |
只看该作者    顶部
离线 justforregister
SAP


精华贴数 1
个人空间 10
技术积分 38458 (19)
社区积分 9928 (153)
注册日期 2005-6-10
论坛徽章:244
现任管理团队成员ITPUB元老奥运纪念徽章NBA2008季后赛纪念徽章欧洲冠军杯纪念徽章NBA常规赛纪念章
管理团队2007贡献徽章参与2007年甲骨文全球大会(中国上海)纪念ITPUB北京香山2007年会纪念徽章2008北京奥运纪念徽章:排球2008北京奥运纪念徽章:跳水2008北京奥运纪念徽章:摔跤

发表于 2008-7-8 00:21 
忘记实现job接口


__________________
Go to Hell
大家一起BS以下菠菜作弊者

| EPS2008          |        35201 | 2008-08-17 22:18:17     |
| missingsky       |        22300 | 2008-08-17 22:19:17     |
| wws8875          |        10000 | 2008-08-17 22:25:54     |
| renxiang         |        23332 | 2008-08-17 22:28:15     |
只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问