1 Reply Latest reply on Jun 1, 2010 2:11 PM by jaikiran pai

    Newbie here..  and in need of some help with Drools

    Dean Carter Newbie

      Hi All,

       

      Firstly im so glad I found this forum and a big hello to everyone in this group!

       

      Currently im working on a project to in which we are deciding to which is the best rules engine to apply for our clients requirements.  Ive been playing around with drools and have sucessfully got it up and running with the Stock ticker example within eclipse.  I have worked with Java some time ago annd must say im very impressed with drools!

       

      Im fairly rusty with Java (but a fast learner) im trying to get up to speed asap.

       

      Ive currently put in simple new rule with the DRL file and am trying to load in my own test data to use with the rules file.  However im getting an error and really cant see what ive done wrong.

       

      My dat file contains simple data e.g

       

      0;5000;£199.99

      0;5001;£199.99

      0;5002;£199.99

      0;5003;£199.99

      0;5004;£199.99

      0;5005;£199.99

      0;5006;£199.99

      0;5007;£199.99

      009;5000;£9.99

      010;5001;£9.99

      011;5002;£9.99

      012;5003;£9.99

      013;5004;£9.99

      014;5005;£9.99

      015;5006;£9.99

      016;5007;£9.99

       

      However for some reason i receive

       

      java.text.ParseException

       

      : MessageFormat parse error!

      at java.text.MessageFormat.parse(Unknown Source)

      at net.game.poc.achievements.events.PointsAwardPersister.load(

      PointsAwardPersister.java:62)

      at net.game.poc.achievements.events.PointsAwardPersister.hasNext(

      PointsAwardPersister.java:85)

      at net.game.poc.achievements.events.EventFeeder$FeedJob.execute(

      EventFeeder.java:84)

      at org.drools.time.impl.JDKTimerService$JDKCallableJob.call(

      JDKTimerService.java:132)

      at org.drools.time.impl.JDKTimerService$JDKCallableJob.call(

      JDKTimerService.java:110)

      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

       

      After debugging the following code is throwing the exception from the load method below.

       

      public

      boolean hasNext() {

       

      if( in != null ) {

       

      try {

         PointsAward tick = load();

       

      next = new EventImpl<PointsAward>( tick.getTimestamp(), tick );

       

      return true;

      }

      catch ( Exception e ) {

       

      // nothing to do, return false

      e.printStackTrace();

      }

      }

       

      return false;

       

       

      It appears to me that it looking over the end of file but im not sure.

       

      Has anyone got any pointers for me as im completly stuck