<font size=2 face="sans-serif">Ok got it, </font>
<br><font size=2 face="sans-serif">Thanks alot.</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Regards<br>
Manohar Kokkula<br>
Mailto: manohar.kokkula@tcs.com<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Tan Hui Onn &lt;huionn@gmail.com&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">Rules Users List &lt;rules-users@lists.jboss.org&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">09/23/2011 04:39 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [rules-users] Exception in Banking
Tutorial in Drools expert &nbsp; &nbsp; &nbsp; &nbsp;guide...</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Sent by:</font>
<td><font size=1 face="sans-serif">rules-users-bounces@lists.jboss.org</font></table>
<br>
<hr noshade>
<br>
<br>
<br><font size=2 face="sans-serif">Obviously, it should be&nbsp; for (int
i=0; i &lt; facts.length;i++), right?</font><font size=3><br>
</font>
<br><font size=3>2011/9/23 Manohar Kokkula &lt;</font><a href=mailto:manohar.kokkula@tcs.com><font size=3 color=blue><u>manohar.kokkula@tcs.com</u></font></a><font size=3>&gt;</font>
<br><font size=2 face="sans-serif">Hi,<br>
<br>
I am trying to execute Banking Tutorial Example given in Drools expert(</font><a href="http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e7769" target=_blank><font size=2 color=blue face="sans-serif"><u>http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e7769</u></font></a><font size=2 face="sans-serif">),but
im getting following error,<br>
<br>
Exception in thread &quot;main&quot; java.lang.ClassCastException: java.util.ArrayList
cannot be cast to org.hibernate.mapping.Collection<br>
at com.sample.RuleRunner.runRules(RuleRunner.java:32)<br>
at com.sample.Example1.main(Example1.java:5)</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
And when i try to resolve this i am getting another error:</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
java.lang.ArrayIndexOutOfBoundsException: 0</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; at com.code.RuleRunner.runRules(RuleRunner.java:45)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; at com.code.Example1.main(Example1.java:5)</font><font size=3><br>
</font><font size=2 face="sans-serif"><b><u><br>
Code snippet :</u></b></font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
&nbsp;for (int i=0; i &lt;=facts.length;i++) <br>
&nbsp; &nbsp; &nbsp; &nbsp; {</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;222&quot;);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Object fact = facts[i];
<b>//The error is for this line of code</b></font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println( &quot;Inserting
fact: &quot; + fact );</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ksession.insert(fact);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=3> </font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;333&quot;);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; }</font><font size=3> <br>
<br>
</font><font size=2 face="sans-serif"><br>
<br>
could any body help me on this.</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
<br>
Manohar Kokkula<br>
Mailto: </font><a href=mailto:manohar.kokkula@tcs.com target=_blank><font size=2 color=blue face="sans-serif"><u>manohar.kokkula@tcs.com</u></font></a>
<br><tt><font size=3>=====-----=====-----=====<br>
Notice: The information contained in this e-mail<br>
message and/or attachments to it may contain <br>
confidential or privileged information. If you are <br>
<br>
not the intended recipient, any dissemination, use, <br>
review, distribution, printing or copying of the <br>
information contained in this e-mail message <br>
and/or attachments to it are strictly prohibited. If <br>
you have received this communication in error, <br>
<br>
please notify us by reply e-mail or telephone and <br>
immediately and permanently delete the message <br>
and any attachments. Thank you<br>
<br>
</font></tt>
<br><font size=3><br>
_______________________________________________<br>
rules-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:rules-users@lists.jboss.org"><font size=3 color=blue><u>rules-users@lists.jboss.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target=_blank><font size=3 color=blue><u>https://lists.jboss.org/mailman/listinfo/rules-users</u></font></a><font size=3><br>
</font>
<br><br>
<tt><font size=2>_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/rules-users</font></tt></a><tt><font size=2><br>
</font></tt><br>
<br>
<br>