<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Newbie here.. and in need of some help with Drools
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/DC_Drools">Darren Carr</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/545605#545605">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi All,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Firstly im so glad I found this forum and a big hello to everyone in this group!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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! </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Im fairly rusty with Java (but a fast learner) im trying to get up to speed asap.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My dat file contains simple data e.g</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 10pt;"><p align="left">0;5000;£199.99</p><p align="left">0;5001;£199.99</p><p align="left">0;5002;£199.99</p><p align="left">0;5003;£199.99</p><p align="left">0;5004;£199.99</p><p align="left">0;5005;£199.99</p><p align="left">0;5006;£199.99</p><p align="left">0;5007;£199.99</p><p align="left">009;5000;£9.99</p><p align="left">010;5001;£9.99</p><p align="left">011;5002;£9.99</p><p align="left">012;5003;£9.99</p><p align="left">013;5004;£9.99</p><p align="left">014;5005;£9.99</p><p align="left">015;5006;£9.99</p><p>016;5007;£9.99</p></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>However for some reason i receive</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #000080; font-size: 10pt; text-decoration: underline; "><p align="left">java.text.ParseException</p><span style="color: #000080; font-size: 10pt; "><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><span style="color: #ff0000; font-size: 10pt; ">: MessageFormat parse error!</span><span style="color: #ff0000; font-size: 10pt; "><p align="left">at java.text.MessageFormat.parse(Unknown Source)</p><p align="left">at net.game.poc.achievements.events.PointsAwardPersister.load(</p><p align="left"><span style="text-decoration: underline;"><span style="color: #000080; font-size: 10pt; ">PointsAwardPersister.java:62</span><span style="color: #ff0000; font-size: 10pt; ">)</span><span style="color: #ff0000; font-size: 10pt; "><p align="left">at net.game.poc.achievements.events.PointsAwardPersister.hasNext(</p><p align="left"><span style="text-decoration: underline;"><span style="color: #000080; font-size: 10pt; ">PointsAwardPersister.java:85</span><span style="color: #ff0000; font-size: 10pt; ">)</span><span style="color: #ff0000; font-size: 10pt; "><p align="left">at net.game.poc.achievements.events.EventFeeder$FeedJob.execute(</p><p align="left"><span style="text-decoration: underline;"><span style="color: #000080; font-size: 10pt; ">EventFeeder.java:84</span><span style="color: #ff0000; font-size: 10pt; ">)</span><span style="color: #ff0000; font-size: 10pt; "><p align="left">at org.drools.time.impl.JDKTimerService$JDKCallableJob.call(</p><p align="left"><span style="text-decoration: underline;"><span style="color: #000080; font-size: 10pt; ">JDKTimerService.java:132</span><span style="color: #ff0000; font-size: 10pt; ">)</span><span style="color: #ff0000; font-size: 10pt; "><p align="left">at org.drools.time.impl.JDKTimerService$JDKCallableJob.call(</p><p align="left"><span style="text-decoration: underline;"><span style="color: #000080; font-size: 10pt; ">JDKTimerService.java:110</span><span style="color: #ff0000; font-size: 10pt; ">)</span><span style="color: #ff0000; font-size: 10pt; "><p align="left">at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)</p><p align="left">at java.util.concurrent.FutureTask.run(Unknown Source)</p><p align="left">at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)</p><p align="left">at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)</p><p align="left">at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)</p><p align="left">at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</p><p align="left">at java.lang.Thread.run(Unknown Source)</p></span></span></p></span></span></p></span></span></p></span></span></p></span></span></p></span></p></span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>After debugging the following code is throwing the exception from the load method below.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong style=": ; color: #7f0055; font-size: 10pt; "><p align="left">public <span style="color: #7f0055; font-size: 10pt; "><p align="left"><strong><span style="color: #7f0055; font-size: 10pt; ">boolean</span><span style="font-size: 10pt;"> hasNext() {</span><span style="font-size: 10pt;"> <strong style=": ; font-size: 2; "><p align="left"><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><strong><span style="color: #7f0055; font-size: 10pt; ">if</span><span style="font-size: 10pt;">( </span><span style="color: #0000c0; font-size: 10pt; ">in</span><span style="font-size: 10pt;"> != </span><strong><span style="color: #7f0055; font-size: 10pt; ">null</span><span style="font-size: 10pt;"> ) {</span><span style="font-size: 10pt;"><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><strong><span style="color: #7f0055; font-size: 10pt; ">try</span><span style="font-size: 10pt;"> {</span><span style="font-size: 10pt;"><p align="left">   PointsAward tick = load();</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><span style="color: #0000c0; font-size: 10pt; ">next</span><span style="font-size: 10pt;"> = </span><strong><span style="color: #7f0055; font-size: 10pt; ">new</span><span style="font-size: 10pt;"> EventImpl<PointsAward>( tick.getTimestamp(), tick );</span><span style="font-size: 10pt;"><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><strong><span style="color: #7f0055; font-size: 10pt; ">return</span><span style="font-size: 10pt;"> </span><strong><span style="color: #7f0055; font-size: 10pt; ">true</span><span style="font-size: 10pt;">;</span><span style="font-size: 10pt;"><p align="left">}</p><p align="left"><strong><span style="color: #7f0055; font-size: 10pt; ">catch</span><span style="font-size: 10pt;"> ( Exception e ) {</span><span style="font-size: 10pt;"><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><span style="color: #3f7f5f; font-size: 10pt; ">// nothing to do, return false</span><span style="font-size: 10pt;"><p align="left">e.printStackTrace();</p><p align="left">}</p><p align="left">}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong><span style="color: #7f0055; font-size: 10pt; ">return</span><span style="font-size: 10pt;"> </span><strong><span style="color: #7f0055; font-size: 10pt; ">false</span><span style="font-size: 10pt;">;</span></strong></strong></p></span></p></span></strong></p></span></strong></strong></p></span></strong></p></span></strong></p></span></strong></strong></p></p></strong></span></strong></p></span></p></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>It appears to me that it looking over the end of file but im not sure.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Has anyone got any pointers for me as im completly stuck</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/545605#545605">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>