[rules-users] Can't use dollar ($) char in Rule Name with Janino compiler

Bree breevanoss at gmail.com
Mon Jan 15 10:09:22 EST 2007


Hi,

I searched the Jboss-rules Jira and didn't find this issue documented yet,
though I may have missed it. 

Essentially it appears that any rule using the U.S. Dollar character ($) in the
rule name fails when compiled with Janino. I was able to reproduce the issue
using the "default" new JBoss-rules project wizard in Eclipse.

The stack trace follows, though it may not be much help. I tried tracking it
down and it looks like the problem is actually caused in the parse/compilation
step (i.e. builder.addPackageFromDrl( source );). After this step the rule in
question has a null "consequence", which causes the
"AbstractRuleBase.addRule(...)" method to fail when it does the isValid() check.

<code>
java.lang.IllegalArgumentException: The rule called Show me da $ is not valid.
Check for compile errors reported.
	at org.drools.common.AbstractRuleBase.addRule(Unknown Source)
	at org.drools.reteoo.ReteooRuleBase.addRule(Unknown Source)
	at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
	at com.sample.DroolsTest.readRule(DroolsTest.java:89)
	at com.sample.DroolsTest.main(DroolsTest.java:29)
</code>

Please let me know if you require additional information and/or if you'd like me
to log this in the Jira.

Thanks,

Bree

 




More information about the rules-users mailing list