3 Replies Latest reply on Sep 21, 2007 3:47 AM by Jayaranga Subasinghe

    Scheduler with seam 1.2.1 throws an IllegalArgumentException

    Jayaranga Subasinghe Newbie

      Hi All,
      Im using seam 1.2.1 on jboss-4.0.5.GA

      Im trying to create a scheduler using @Asynchronous, which is to be started on application startup

      here is my code :

      public interface DRAMP_PDMTimeOut {
       public Timer scheduleMail(@Duration long when,
       @IntervalDuration long interval,@Expiration Date date);
       public void destroy();

      implementation :

      public class DRAMP_PDMTimeOutAction extends BusinessLogicAdapter implements DRAMP_PDMTimeOut{
       @In Timer timer;
       public Timer scheduleMail(@Duration long when,
       @IntervalDuration long interval, @Expiration Date date){
       PreDepartureMailTextLogger.logMessage("currentPortal ");
      // do something

      my caller method :
      public class DRAMP_PredepartureTimerLogicAction extends BusinessLogicAdapter implements DRAMP_PredepartureTimerLogic {
       private DRAMP_PDMTimeOut action;
       private Timer timer;
       public DRAMP_PredepartureTimerLogicAction() {
       PreDepartureMailTextLogger.logMessage("@ constructor............... ");
       public void createTimer() {
       PreDepartureMailTextLogger.logMessage("@createTimer........ ");
       try {
       PreDepartureMailTextLogger.logMessage("this should fire ");
       timer = action.scheduleMail(60*1000 * 2, 60*1000 * 2, new Date());
       } catch (Exception e) {
       // TODO Auto-generated catch block

      Problem is, it throws an exception when the schedule task invoked.
      2007-09-21 10:50:46,393 ERROR [org.jboss.ejb.txtimer.TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBException: java.lang.IllegalArgumentException: Could not invoke method by reflection: Object_$$_javassist_2145.scheduleMail(long, long, java.util.Date) with parameters: (org.jboss.seam.Component) on: org.javassist.tmp.java.lang.Object_$$_javassist_2145

      Anybody please help me