[rules-users] Exception in Banking Tutorial in Drools expert guide...

Manohar Kokkula manohar.kokkula at tcs.com
Fri Sep 23 06:46:00 EDT 2011


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 at 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


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


More information about the rules-users mailing list