4 Replies Latest reply on Apr 10, 2015 8:18 AM by Peter Ivarsson

    Changing the package of a class containing an @Schedule make application to fail.

    Peter Ivarsson Newbie

      When i change the packagename from se.sfbio.scheduler.offer.fetch to se.sfbio.scheduler.offer

       

      I get this error:

      10:45:46,008 ERROR [org.jboss.as.ejb3] (EJB default - 3) JBAS014129: Could not restore timer from /Users/piv/wildfly-8.2.0/standalone/data/timer-service-data/sfbio-mobile-backend-scheduler-1.0-SNAPSHOT.sfbio-mobile-backend-scheduler-1.0-SNAPSHOT.FetchOffers/8f493a5f-01fb-41ca-9a0a-4fa9ec5a4e45: java.lang.RuntimeException: JBAS014480: Could not load declaring class: se.sfbio.scheduler.offer.fetch.FetchOffers of timeout method

        at org.jboss.as.ejb3.timerservice.CalendarTimer.getTimeoutMethod(CalendarTimer.java:303) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

        at org.jboss.as.ejb3.timerservice.persistence.filestore.FileTimerPersistence.loadTimersFromFile(FileTimerPersistence.java:303) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

        at org.jboss.as.ejb3.timerservice.persistence.filestore.FileTimerPersistence.getTimers(FileTimerPersistence.java:275) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]

       

      It doesen't help to remove the builds (wars) or restart shutdown/startup wildfly again.

       

      And to rename back the package to se.sfbio.scheduler.offer.fetch doesn't help!

       

      What can I do?

       

      /Peter

       

      My code:

       

      package se.sfbio.scheduler.offer.fetch;

       

      import javax.ejb.Schedule;

      import javax.ejb.Singleton;

      import javax.inject.Inject;

      import se.sfbio.mobilebackend.services.service.LoggerService;

       

      /**

      *

      * @author Peter Ivarsson Peter.Ivarsson@cybercom.com

      */

      @Singleton

      public class FetchOffers {

         

         @Inject

         LoggerService logger;

        

         /**

          *

          * Schedule every 1 minutes

          */

         @Schedule( minute="*/1", hour="*" )

         public void getOffers() {

            

            logger.debug( "Scheduling getOffers()", this.getClass().getCanonicalName() );

           

         }

      }