[rules-users] Drools 5.1.1 : Error reporting issue in PackageBuilder

arjun dhar dhar_ar at yahoo.com
Sun Mar 20 00:13:08 EDT 2011


Hi,
 I was trying out the new stable version of Drools and on faulty DRL files I was getting:

Exception in thread "main" java.lang.ArrayStoreException
    at java.lang.System.arraycopy(Native Method)
    at java.util.ArrayList.toArray(ArrayList.java:306)
    at org.drools.compiler.PackageBuilder.getErrors(PackageBuilder.java:1274)
    at org.drools.builder.impl.KnowledgeBuilderImpl.getErrors(KnowledgeBuilderImpl.java:70)
    at com.arjun.SetGame.main(SetGame.java:18)

The actual Error being:: (See Reference DRL at the end of this post)
[Unable to resolve ObjectType 'MockBoolean' : [Rule name='show_time']
, Incorrect number of arguments for interval timer 'int 5s 2m']

I'd assume it be better to have an Exception with the root cause, than a faulty Error trapping system, that is trapping a System generated Exception. Is this a bug in "PackageBuilder : Line 1274"?

Reference DRL:
package com.arjun

    rule show_time
        timer (int 5s 2m)
        when 
            MockBoolean(value == true)
        then
            System.out.println("Hey");
    end






      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110319/68c903f1/attachment.html 


More information about the rules-users mailing list