Hi,

I am trying to execute Banking Tutorial Example given in Drools expert(
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e7769),but im getting following error,

Exception in thread "main" java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.hibernate.mapping.Collection
at com.sample.RuleRunner.runRules(RuleRunner.java:32)
at com.sample.Example1.main(Example1.java:5)


And when i try to resolve this i am getting another error:

java.lang.ArrayIndexOutOfBoundsException: 0
        at com.code.RuleRunner.runRules(RuleRunner.java:45)
        at com.code.Example1.main(Example1.java:5)

Code snippet :

 for (int i=0; i <=facts.length;i++)
        {
            System.out.println("222");
                Object fact = facts[i]; //The error is for this line of code
         
   
           System.out.println( "Inserting fact: " + fact );
           ksession.insert(fact);
           
           System.out.println("333");
        }



could any body help me on this.


Manohar Kokkula
Mailto: manohar.kokkula@tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you