Quartz scheduler immer Fehler auf server starten
ich bin mit Quarz-scheduling in der web-Anwendung auf meinem Klasse SchedulerJob ich bin das abrufen von Daten fro DB und Einstellung einige Felder basierend auf einer Bedingung, sondern ich erhalte die folgende Fehlermeldung
org.quartz.SchedulerException: JobStore class 'org.quartz.simpl.RAMJobStore' props could not be configured. [See nested exception: java.lang.NoSuchMethodException: No setter for property 'driverDelegateClass,']
habe ich quartz.properties-Datei, in der ich den vorgegebenen RAM-JOB wie
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 10
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
org.quartz.jobStore.tablePrefix,
org.quartz.jobStore.driverDelegateClass,
org.quartz.jobStore.dataSource
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
meine Klassen sind
public class QuartzSchedulerListener implements ServletContextListener {
public void contextDestroyed(ServletContextEvent arg0) {
//
}
public void contextInitialized(ServletContextEvent arg0) {
JobDetail job = JobBuilder.newJob(SchedulerJob.class)
.withIdentity("anyJobName", "group1").build();
try {
Trigger trigger = TriggerBuilder
.newTrigger()
.withIdentity("anyTriggerName", "group1")
.withSchedule(
CronScheduleBuilder.cronSchedule("0/10 * * * * ?"))
.build();
Scheduler scheduler = new StdSchedulerFactory().getScheduler();
scheduler.start();
scheduler.scheduleJob(job, trigger);
} catch (SchedulerException e) {
e.printStackTrace();
}
}
}
die brennen alle 10 Sekunden
und ein SchedulerJob tun der job wie
public class SchedulerJob implements Job {
private static final Logger LOGGER = LoggerFactory.getLogger(SchedulerJob.class);
@EJB
private Iinterface service;
public void execute(JobExecutionContext context)
throws JobExecutionException {
//fetch list from DB
List<SampleClass> list= new ArrayList<SampleClass>();
try {
list= service.getData();
LOGGER.info("after action cron");
} catch (Exception e) {
LOGGER.info("exception action cron");
e.printStackTrace();
}
DO some operation and update on this list
System.out.println("Struts 2.3.4 + Quartz 2.1.5");
}
}
Dies ist der volle stack-trace
[#|2013-05-20T23:36:32.132+0530|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=10;_ThreadName=Thread-2;|org.quartz.SchedulerException: JobStore class 'org.quartz.simpl.RAMJobStore' props could not be configured. [See nested exception: java.lang.NoSuchMethodException: No setter for property 'driverDelegateClass,']
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:874)
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1502)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:219)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:253)
at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
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 com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Verursacht durch: java.lang.NoSuchMethodException: Keine setter für Eigenschaft 'driverDelegateClass,'
bei org.Quarz.impl.StdSchedulerFactory.setBeanProps(StdSchedulerFactory.java:1390)
bei org.Quarz.impl.StdSchedulerFactory.instanziieren(StdSchedulerFactory.java:872)
37 mehr ...
|#]
bitte vorschlagen, was mache ich hier falsch
Du musst angemeldet sein, um einen Kommentar abzugeben.
Es ist keine Eigenschaft org.Quarz.jobStore.driverDelegateClass für die RamJobStore.
Auch Ihre Eigenschaften-Datei enthält andere falsche Eigenschaften für die Art der Arbeit speichern Sie mit:
Warum sind Sie getrennt durch Komma?
Sie dürfen zum speichern von quartz-jobs im Speicher (durch die Verwendung RamJobStore) oder fortbestehen zu RDBMS (mit JobStoreTx). Also zu aller erst zu sich selbst entscheiden, welche Art von Speicher, den Sie brauchen, in Ihrem Fall. für jeden Fall der Beispiele sind auf der Quarz-Seite.