Results 1 to 9 of 9

Thread: Gettting Isssues when Integrating Quartz with Spring

  1. #1
    Join Date
    Jan 2008
    Posts
    21

    Default Gettting Isssues when Integrating Quartz with Spring

    I have added the following bean definitions to my applicationContext xml.

    <bean id="batchJob" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="test"/>
    <property name="targetMethod" value="execute"/>
    <property name="concurrent" value="false" />
    </bean>

    <bean id="test" class="gov.ed.app.ats.batch.test.Test"/>


    <bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
    <property name="jobDetail" ref="batchJob" />

    <property name="cronExpression" value="0 * 10 * * ?" />

    </bean>
    <bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="triggers">
    <list>
    <ref bean="cronTrigger" />
    </list>
    </property>
    </bean>

    But when I am restarting the server to kick off the job.I am getting some errors.
    I am hereby enclosing my errors.

    Can anyone please help me why I am getting this issue ASAP.
    Attached Files Attached Files

  2. #2

    Default

    Code:
    Caused by: java.lang.ClassNotFoundException: org.quartz.JobExecutionException
    Looks like you are missing something from your classpath.

  3. #3
    Join Date
    Jan 2008
    Posts
    21

    Default Gettting Isssues when Integrating Quartz with Spring

    I added new quartz-all-1.6.0 jar file that comes with my Spring 2.5 version and I am getting new errors now.

    I am attaching the new errors file.

    Please help me with this.
    Attached Files Attached Files

  4. #4
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    Is that your entire configuration posted? I don't see a JobDetail bean.

  5. #5
    Join Date
    Jan 2008
    Posts
    21

    Default Gettting Isssues when Integrating Quartz with Spring

    As per my understanding this should replace JobDetail bean

    <bean id="batchJob" class="org.springframework.scheduling.quartz.Metho dInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="test"/>
    <property name="targetMethod" value="execute"/>
    <property name="concurrent" value="false" />
    </bean>

    Please let me know if that's not the case.

  6. #6
    Join Date
    Nov 2006
    Posts
    12

    Default

    I used a trigger and SchedulerFactoryBean:

    Code:
    	<bean id="myJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    		<property name="targetObject" ref="groovyGenerator" />
    		<property name="targetMethod" value="generateEntity" />
    		<property name="concurrent" value="false" />
    	</bean>
    	<bean id="myTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    		<property name="jobDetail" ref="myJob" />
    		<!-- every minute -->
    		<property name="cronExpression" value="01 * * * * ?" />
    	</bean>
    
    	<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    		<property name="triggers">
    			<list>
    				<ref local="myTrigger" />
    			</list>
    		</property>
    	</bean>

  7. #7

    Default

    It looks to me like an AOP problem - something you are doing is creating a proxy of your job detail bean that is not compatible with JobDetail.

  8. #8
    Join Date
    Jan 2008
    Posts
    21

    Default Gettting Isssues when Integrating Quartz with Spring

    What does that means?How the proxy is getting created.What can I do for that.

  9. #9
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    What he's saying is that it appears that Spring isn't seeing it as a type of JobDetail, but rather is seeing the proxy instead. This can be caused by a wide array of issues with your spring configuration. But it's more spring in general than a batch issue. Perhaps you could try posting the error again in the general spring forum?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •