I queried this issue some months back and the response back then was that it couldn't be fixed and that we shouldn't use '$' in the rule files. I suggested back then that the example doco should be updated to reflect this.
<br><br><div><span class="gmail_quote">On 1/16/07, <b class="gmail_sendername">Mark Proctor</b> <<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Bree,<br><br>Feel free to log it in JIRA for JBoss Rules, however we cannot fix this<br>. You will need to also log a bug in the Janino JIRA for it to be<br>fixed there. My suggestion is to also prove that this doesn't work with
<br>a standalone Janino use.<br><br>Mark<br>Bree wrote:<br>> Hi,<br>><br>> I searched the Jboss-rules Jira and didn't find this issue documented yet,<br>> though I may have missed it.<br>><br>> Essentially it appears that any rule using the
U.S. Dollar character ($) in the<br>> rule name fails when compiled with Janino. I was able to reproduce the issue<br>> using the "default" new JBoss-rules project wizard in Eclipse.<br>><br>> The stack trace follows, though it may not be much help. I tried tracking it
<br>> down and it looks like the problem is actually caused in the parse/compilation<br>> step (i.e. builder.addPackageFromDrl( source );). After this step the rule in<br>> question has a null "consequence", which causes the
<br>> "AbstractRuleBase.addRule(...)" method to fail when it does the isValid() check.<br>><br>> <code><br>> java.lang.IllegalArgumentException: The rule called Show me da $ is not valid.<br>> Check for compile errors reported.
<br>> at org.drools.common.AbstractRuleBase.addRule(Unknown Source)<br>> at org.drools.reteoo.ReteooRuleBase.addRule(Unknown Source)<br>> at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
<br>> at com.sample.DroolsTest.readRule(DroolsTest.java:89)<br>> at com.sample.DroolsTest.main(DroolsTest.java:29)<br>> </code><br>><br>> Please let me know if you require additional information and/or if you'd like me
<br>> to log this in the Jira.<br>><br>> Thanks,<br>><br>> Bree<br>><br>><br>><br>> _______________________________________________<br>> rules-users mailing list<br>> <a href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>><br>><br><br>_______________________________________________
<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br></blockquote></div><br>