3 Replies Latest reply on Aug 1, 2009 10:11 AM by jeremy girard

    async:quartz-dispatcher is not working.

    kian ping low Newbie

      I placed quartz-dispatcher in the component.xml and created a PaymentProcessor.


      '@Name(processor)
      @AutoCreate
      public class PaymentProcessor {


              @In
              EntityManager entityManager;


              @Logger Log log;


              @Asynchronous
              public QuartzTriggerHandle schedulePayment(@Expiration Date when,
                              @IntervalDuration Long interval,
                              @FinalExpiration Date stoptime,
                              Short FineId)
              { ....}
      }'



      But after running it gave me


      java.lang.IllegalArgumentException: Can only use @FinalExpiration with the QuartzDispatcher


        • 1. Re: async:quartz-dispatcher is not working.
          kian ping low Newbie

          Further more i encounter the below errors. Am i missing some libraries or configurations?


          org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.async.dispatcher
               at org.jboss.seam.Component.newInstance(Component.java:2096)
               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:727)
               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
               at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
               at org.jboss.web.WebModule.startModule(WebModule.java:83)
               at org.jboss.web.WebModule.startService(WebModule.java:61)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor493.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy45.start(Unknown Source)
               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
               at sun.reflect.GeneratedMethodAccessor1404.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
               at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
               at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
               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:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy46.start(Unknown Source)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
               at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               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:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy9.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
          Caused by: java.lang.RuntimeException: exception invoking: initScheduler
               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:148)
               at org.jboss.seam.Component.callComponentMethod(Component.java:2201)
               at org.jboss.seam.Component.callCreateMethod(Component.java:2124)
               at org.jboss.seam.Component.newInstance(Component.java:2084)
               ... 94 more
          Caused by: org.quartz.SchedulerConfigException: Unable to instantiate class load helper class: org.quartz.simpl.CascadingClassLoadHelper [See nested exception: java.lang.ClassCastException: org.quartz.simpl.CascadingClassLoadHelper]
               at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:641)
               at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1355)
               at org.jboss.seam.async.QuartzDispatcher.initScheduler(QuartzDispatcher.java:69)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138)
               ... 97 more
          Caused by: java.lang.ClassCastException: org.quartz.simpl.CascadingClassLoadHelper
               at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:638)
               ... 105 more


          • 2. Re: async:quartz-dispatcher is not working.
            Allan Topp Newbie

            It may be related but we saw a similar problem. The answer was that the quartz.jar needed to be included within the EAR with a loader-repository. Otherwise it tried to use the implementation of quartz included with JBoss. Not sure if it is the same problem but worth a try

            • 3. Re: async:quartz-dispatcher is not working.
              jeremy girard Newbie

              Allan Topp wrote on Apr 03, 2009 02:47:


              The answer was that the quartz.jar needed to be included within the EAR


              That's it ! thanks.
              I had a similar pb because i put quartz.jar in WEB-INF/lib ...