-
1. Re: Quartz issues
gaborj Apr 21, 2010 3:47 PM (in response to bbasdeo)Hi,
There is such trigger type in Quartz which you can use with your chosen missfire instruction, check Quartz Tutorial for details, e.g. this about triggers
If this is not enough and you want full control over the missed schedule time jobs e.g. with dependencies... then you can persist your triggers of your quartz jobs into database and e.g. create a seam component triggered with app startup, check your db and reschedule your jobs if needed...
-
2. Re: Quartz issues
bbasdeo Apr 22, 2010 8:41 AM (in response to bbasdeo)Hello
Thank you Gabor for your help. I will investigate and imlement the misfire intstruction.
Rgds,
Neerou -
3. Re: Quartz issues
bbasdeo Apr 30, 2010 9:47 AM (in response to bbasdeo)Hello again,
I have done some research on the misfire instruction but am unable to find a correct tutorial which explains Misfire Instruction and QuartzTriggerHandle. Does anyone have any idea?
Regards
Neerou -
4. Re: Quartz issues
kapitanpetko Apr 30, 2010 10:36 AM (in response to bbasdeo)What did you find out? Check this about different misfire instruction types. If you want to have persistent jobs, you need to store them in the database. There is info about this on the Quartz site, as well on this forum.
-
5. Re: Quartz issues
bbasdeo Apr 30, 2010 11:28 AM (in response to bbasdeo)Hi,
I have noticed there are no tutorial or any mention of misfire use with QuartzTriggerHandle. Misfire instructions are used only if jobdetail and triggers are instanciated separately. Am i right?
Neerou
-
6. Re: Quartz issues
bbasdeo Apr 30, 2010 1:53 PM (in response to bbasdeo)Hi
I am getting this error:
14:39:28,687 INFO [Contexts] starting up: org.jboss.seam.async.dispatcher 14:39:29,078 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created. 14:39:29,078 INFO [JobStoreTX] Using thread monitor-based data access locking (synchronization). 14:39:29,250 INFO [JobStoreTX] Removed 0 Volatile Trigger(s). 14:39:29,250 INFO [JobStoreTX] Removed 0 Volatile Job(s). 14:39:29,296 INFO [JobStoreTX] JobStoreTX initialized. 14:39:29,296 INFO [StdSchedulerFactory] Quartz scheduler 'Sched1' initialized from an externally opened InputStream. 14:39:29,296 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2 14:39:29,328 INFO [JobStoreTX] Freed 0 triggers from 'acquired' / 'blocked' state. 14:39:29,359 INFO [JobStoreTX] Handling 2 triggers that missed their scheduled fire-time. 14:39:29,484 ERROR [[/leaves]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.async.dispatcher at org.jboss.seam.Component.newInstance(Component.java:2106) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112) at org.jboss.seam.init.Initialization.init(Initialization.java:735) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144) at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) at org.jboss.web.deployers.WebModule.start(WebModule.java:97) 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) at $Proxy36.start(Unknown Source) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37) at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.system.ServiceController.doChange(ServiceController.java:688) at org.jboss.system.ServiceController.start(ServiceController.java:460) at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46) at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405) at org.jboss.Main.boot(Main.java:209) at org.jboss.Main$1.run(Main.java:547) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: exception invoking: initScheduler at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154) at org.jboss.seam.Component.callComponentMethod(Component.java:2211) at org.jboss.seam.Component.callCreateMethod(Component.java:2134) at org.jboss.seam.Component.newInstance(Component.java:2094) ... 64 more Caused by: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't recover jobs: Couldn't store trigger: org.jboss.seam.async.AsynchronousInvocation [See nested exception: org.quartz.JobPersistenceException: Couldn't store trigger: org.jboss.seam.async.AsynchronousInvocation [See nested exception: java.lang.ClassNotFoundException: org.jboss.seam.async.AsynchronousInvocation]]] at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:512) at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:396) at org.quartz.impl.StdScheduler.start(StdScheduler.java:147) at org.jboss.seam.async.QuartzDispatcher.initScheduler(QuartzDispatcher.java:70) 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.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) ... 67 more 14:39:29,484 ERROR [StandardContext] Error listenerStart 14:39:29,484 ERROR [StandardContext] Context [/leaves] startup failed due to previous errors 14:39:29,500 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/leaves state=Create mode=Manual requiredState=Installed org.jboss.deployers.spi.DeploymentException: URL file:/E:/JBoss/jboss-5.0.1.GA-jdk6/server/default/tmp/5c4ok57-1s0djo-g8mve8ba-1-g8mvet5r-o/leaves-ear.ear/leaves.war/ deployment failed at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144) at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) at org.jboss.web.deployers.WebModule.start(WebModule.java:97) 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) at $Proxy36.start(Unknown Source) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37) at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.system.ServiceController.doChange(ServiceController.java:688) at org.jboss.system.ServiceController.start(ServiceController.java:460) at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46) at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405) at org.jboss.Main.boot(Main.java:209) at org.jboss.Main$1.run(Main.java:547) at java.lang.Thread.run(Thread.java:619) 14:39:29,515 INFO [PersistenceUnitDeployment] Stopping persistence unit persistence.unit:unitName=leaves-ear.ear/leaves-ejb.jar#leaves 14:39:29,515 INFO [SessionFactoryImpl] closing 14:39:29,515 INFO [SessionFactoryObjectFactory] Unbinding factory from JNDI name: persistence.unit:unitName=leaves-ear.ear/leaves-ejb.jar#leaves 14:39:29,515 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} 14:39:29,515 INFO [SessionFactoryObjectFactory] Unbound factory from JNDI name: persistence.unit:unitName=leaves-ear.ear/leaves-ejb.jar#leaves 14:39:29,531 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=leaves-ear.ear,jar=jboss-seam.jar,name=EjbSynchronizations,service=EJB3 14:39:29,562 INFO [EJBContainer] STOPPED EJB: org.jboss.seam.transaction.EjbSynchronizations ejbName: EjbSynchronizations 14:39:29,703 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=leaves-ear.ear,jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3 14:39:29,718 INFO [EJBContainer] STOPPED EJB: org.jboss.seam.async.TimerServiceDispatcher ejbName: TimerServiceDispatcher 14:39:29,812 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/E:/JBoss/jboss-5.0.1.GA-jdk6/server/default/deploy/leaves-ear.ear/ state=PreReal mode=Manual requiredState=Real org.jboss.deployers.spi.DeploymentException: URL file:/E:/JBoss/jboss-5.0.1.GA-jdk6/server/default/tmp/5c4ok57-1s0djo-g8mve8ba-1-g8mvet5r-o/leaves-ear.ear/leaves.war/ deployment failed at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144) at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) at org.jboss.web.deployers.WebModule.start(WebModule.java:97) 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) at $Proxy36.start(Unknown Source) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37) at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.system.ServiceController.doChange(ServiceController.java:688) at org.jboss.system.ServiceController.start(ServiceController.java:460) at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46) at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405) at org.jboss.Main.boot(Main.java:209) at org.jboss.Main$1.run(Main.java:547) at java.lang.Thread.run(Thread.java:619) 14:39:29,890 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS IN ERROR: Deployment "vfsfile:/E:/JBoss/jboss-5.0.1.GA-jdk6/server/default/deploy/leaves-ear.ear/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/E:/JBoss/jboss-5.0.1.GA-jdk6/server/default/tmp/5c4ok57-1s0djo-g8mve8ba-1-g8mvet5r-o/leaves-ear.ear/leaves.war/ deployment failed 14:39:29,953 ERROR [STDERR] Exception in thread "Sched1_QuartzSchedulerThread" 14:39:29,968 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8585 14:39:29,968 ERROR [STDERR] org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable. 14:39:29,968 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:798) 14:39:29,968 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601) 14:39:30,000 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8514 14:39:30,015 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333) 14:39:30,015 ERROR [STDERR] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307) 14:39:30,015 ERROR [STDERR] at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645) 14:39:30,015 ERROR [STDERR] at org.quartz.core.QuartzSchedulerThread.getLog(QuartzSchedulerThread.java:475) 14:39:30,031 ERROR [STDERR] at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:404) 14:39:30,015 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902232048)] Started in 1m:38s:474ms
Can anyone help me out? Where did I go wrong?
Rgds
Neerou -
7. Re: Quartz issues
bbasdeo Apr 30, 2010 1:58 PM (in response to bbasdeo)Hi
components.xml
<async:quartz-dispatcher /> <event type="org.jboss.seam.postInitialization"> <action execute="#{quartzController.scheduleTimer}" /> </event>
seam.quartz.properties
#============================================================== # Configure Main Scheduler Properties #============================================================== org.quartz.scheduler.instanceName= Sched1 org.quartz.scheduler.instanceId= AUTO org.quartz.scheduler.rmi.export= false org.quartz.scheduler.rmi.proxy= false #============================================================== # Configure ThreadPool #============================================================== org.quartz.threadPool.class= org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount= 3 #============================================================== # Configure JobStore #============================================================== org.quartz.jobStore.misfireThreshold= 5000 #org.quartz.jobStore.class= org.quartz.simpl.RAMJobStore org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.jobStore.tablePrefix=QRTZ_ org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate org.quartz.jobStore.dataSource=qzDS org.quartz.dataSource.qzDS.maxConnections=30 org.quartz.dataSource.qzDS.jndiURL = java:/QUARTZDatasource
leaves-ds
<datasources> <local-tx-datasource> <jndi-name>leavesDatasource</jndi-name> <connection-url>jdbc:postgresql://127.0.0.1:5432/lms</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>postgres</user-name> <password>astek</password> </local-tx-datasource> <local-tx-datasource> <jndi-name>QUARTZDatasource</jndi-name> <connection-url>jdbc:postgresql://127.0.0.1:5432/QZ_SMPL</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>postgres</user-name> <password>astek</password> </local-tx-datasource> </datasources>
QuartzController
@Name("quartzController") @AutoCreate @Startup @Scope(ScopeType.APPLICATION) public class QuartzController implements Serializable { @In ScheduleProcessor processor; private QuartzTriggerHandle quartzTriggerHandleDoJob; @Create public void scheduleTimer() { // Seconds YES 0-59 , - * / // Minutes YES 0-59 , - * / // Hours YES 0-23 , - * / // Day of month YES 1-31 , - * ? / L W // Month YES 1-12 or JAN-DEC , - * / // Day of week YES 1-7 or SUN-SAT , - * ? / L # // Year NO empty, 1970-2099 , - * / quartzTriggerHandleDoJob = processor.doJob(new Date(), "0 0/3 * * * ? "); } }
ScheduleProcessor
@Name("processor") @AutoCreate @Scope(ScopeType.APPLICATION) public class ScheduleProcessor { @Logger static Log log; @In EntityManager entityManager; private String archiveYear; private static final String EJBQL = "select lmsLeavesBank from LmsLeavesBank lmsLeavesBank where lmsUsers.usrDateLeft = null"; @Asynchronous @Transactional public QuartzTriggerHandle doJob(@Expiration Date when, @IntervalCron String interval) { // do something return null; } private void doLeavesAccountLogging() { } public void updateLeavesAc() { //do something } public String getArchiveYear() { return archiveYear; } public void setArchiveYear(String archiveYear) { this.archiveYear = archiveYear; } }
These are the implementation. I apologise for not sending the whole post once, but I was getting issues with the validation.
Rgds
Neerou -
8. Re: Quartz issues
kapitanpetko May 6, 2010 3:19 AM (in response to bbasdeo)You seem to be using an old Quartz version, try the newest one. Seam requires at least 1.6:
[QuartzScheduler] Quartz Scheduler v.1.5.2 created.
And this is looks like a class loading problem, check your deployment:
[See nested exception: java.lang.ClassNotFoundException: org.jboss.seam.async.AsynchronousInvocation]
-
9. Re: Quartz issues
cash1981 May 6, 2010 2:03 PM (in response to bbasdeo)
Nikolay Elenkov wrote on May 06, 2010 03:19:
You seem to be using an old Quartz version, try the newest one. Seam requires at least 1.6:[QuartzScheduler] Quartz Scheduler v.1.5.2 created.
Hi.
Where did you get this information that Seam requires at least 1.6?
Even in the supported version of Seam, it is 1.5.2 that is shipped with Seam 2.2I noticed Seam 2.2.1.CR1 ships 1.6, but what if you are using 2.2.0 ?
-
10. Re: Quartz issues
kapitanpetko May 7, 2010 3:17 AM (in response to bbasdeo)
Shervin Asgari wrote on May 06, 2010 14:03:
Where did you get this information that Seam requires at least 1.6?
Even in the supported version of Seam, it is 1.5.2 that is shipped with Seam 2.2Experience :) Even 2.0.x shipped with Quartz 1.6.0 and AFAIK 2.2.0 ships with the same version (which is buggy, so don't use it).
The 1.5.2 is probably the on part of JBoss (I think they use it to implement the TimerService), so if you don't include the Quartz
jars in your webapp it gets used by default. -
11. Re: Quartz issues
bbasdeo May 7, 2010 7:19 AM (in response to bbasdeo)Thank you for the replies. Indeed Nikolay, you are right, I didn't include any quartz jar in the webapp, so my application was using the default one. Now I have included the jar in the lib, and specified the propoerties for the quartz and job scheduling