2 Replies Latest reply on Mar 1, 2010 4:49 PM by The Empi

    QuartzScheduler on Tomcat: "Group name cannot be empty"

    The Empi Newbie

      Hi,


      I'm trying to get the Quartz Scheduler in my Seam Application working.
      Whenever I boot the application and it's trying to initialize the TriggerHandle I get the exception Group Name cannot be empty.


      I have no idea what I am doing wrong.


      I would appreciate any hints



      •   quartz.jar is included in WEB-INF/lib (Version 1.4.3)

      • async:quartz-dispatcher tag is in my components.xml

      • seam.quartz.properties is under WEB-INF/classes

      • running Seam 2.2.0.GA on Tomcat 6.0.



      This is my code


      @Name("controller")
      @AutoCreate
      @Scope(ScopeType.APPLICATION)
      public class ScheduleController implements Serializable {
          @In
          private SchedulerProcessor processor;
          @Logger
          private Log log;  
      
          private QuartzTriggerHandle quartzTestTriggerHandle;
          private static String CRON_INTERVAL = "0 * * * * ?";
      
          @Observer("org.jboss.seam.postInitialization")
          public void scheduleTimer() {
              log.info("Creating Cronjob");
           quartzTestTriggerHandle = processor.createQuartzTestTimer(new Date(), CRON_INTERVAL);
          }
      }
      
      @Name("processor")
      @AutoCreate
      @Scope(ScopeType.APPLICATION)
      public class SchedulerProcessor {
      
          @Asynchronous
          @Transactional
          public QuartzTriggerHandle createQuartzTestTimer(@Expiration Date when, @IntervalCron String interval) {
      
              triggerStatusmail();
      
              return null;
          }
          ...
      }
      




      The Exception:



      28.02.2010 17:58:04 org.apache.catalina.core.StandardContext listenerStart
      SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.IllegalArgumentException: Group name cannot be empty.
           at org.quartz.JobDetail.setGroup(JobDetail.java:196)
           at org.quartz.JobDetail.\<init\>(JobDetail.java:122)
           at org.jboss.seam.async.QuartzDispatcher.scheduleWithQuartzService(QuartzDispatcher.java:132)
           at org.jboss.seam.async.QuartzDispatcher.scheduleWithQuartzServiceAndWrapExceptions(QuartzDispatcher.java:115)
           at org.jboss.seam.async.QuartzDispatcher.scheduleInvocation(QuartzDispatcher.java:101)
           at org.jboss.seam.async.QuartzDispatcher.scheduleInvocation(QuartzDispatcher.java:44)
           at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:40)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
           at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
           at de.bla.scheduler.SchedulerProcessor_$$_javassist_seam_2.createQuartzTestTimer(SchedulerProcessor_$$_javassist_seam_2.java)
           at de.bla.scheduler.ScheduleController.scheduleTimer(ScheduleController.java:40)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              ...
      



      Thanks
      empi