Skip to main content

Spring 2.5 + quartz java.lang.NoClassDefFoundError: org/quartz/JobDetail



I have an issue with quartz library. I'm using it with spring 2.5:







<bean id="reminderBean" class="com.mail.timexis.ReminderBean">

<property name="mailSender">

<ref local="timexisMailSender" />

</property>

</bean>



<bean id="jobDetail"

class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">

<property name="targetObject" ref="reminderBean" />

<property name="targetMethod" value="execute" />

</bean>



<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">

<property name="jobDetail" ref="jobDetail" />

<!-- run every morning at 6 AM -->

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

</bean>



<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">

<property name="triggers">

<list>

<ref bean="cronTrigger" />

</list>

</property>

</bean>







Maven:







<dependency>

<groupId>org.quartz-scheduler</groupId>

<artifactId>quartz</artifactId>

<version>1.8.4</version>

</dependency>

<dependency>

<groupId>commons-collections</groupId>

<artifactId>commons-collections</artifactId>

<version>3.2</version>

</dependency>







And when i run tomcat it cannot instantiate "jobDetail" bean because it can't see JobDetail class used by MethodInvokingJobDetailFactoryBean class ( Caused by: java.lang.NoClassDefFoundError: org/quartz/JobDetail)





Maven downloads the jars and i can see it under MavenDependencies and I can find the JobDetail class.





I think it's something with the compatibility of spring 2.5 and quartz. Any ideas?


Comments

  1. Did you add the dependency to spring-context-support ?

    It contains the org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean which seems to be missing according to the stacktrace.

    ReplyDelete
  2. You need to add external jar file for class org.quartz.JobDetail

    Get it from here

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex