Yes. Actually that is exactly what I did, but I wanted to test something out in the process and I decided to try it like that. But in any case, I am using your line instead. I wrote the disclaimer in the email I sent with the code :)<br>

<br><div class="gmail_quote">On Mon, May 24, 2010 at 12:59 AM, Wolfgang Laun-2 [via Drools - Java Rules Engine] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=839339&i=0" target="_top" rel="nofollow">[hidden email]</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">

On 23 May 2010 15:31, malkhafaji <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=838997&amp;i=0" rel="nofollow" target="_blank" link="external">[hidden email]</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;">



<br>
Hello,<br>
<br>
I am trying to create a bunch of KnowledgeBase objects, this is what I am<br>
doing:<br>
<br>
1. create one List of KnowledgePackage objects (pre-compile them).<br>
2. Create X number of KnowledgeBases, and for each knowledge base do this:<br>
<br>
for (KnowledgePackage kp : this.knowledgePackages) {<br>
                                Collection&lt;KnowledgePackage&gt; collections = new<br>
ArrayList&lt;KnowledgePackage&gt;();<br>
                                collections.add(kp);<br>
                                knowledgeBase.addKnowledgePackages(collections);<br>
                        }<br></blockquote></div><br></div><div class="im">This is a very circumstantial way of doing<br><br>   knowledgeBase.addKnowledgePackages( this.knowledgePackages );<br><br>-W<br>
<br></div>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=838997&amp;i=1" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br><div class="im"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br><br>
</div><hr color="#cccccc" noshade size="1">
<div style="color: rgb(102, 102, 102); font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
View message @ <a href="http://drools-java-rules-engine.46999.n3.nabble.com/ArrayIndexOutOfBounds-when-calling-addKnowledgePackage-tp837841p838997.html" target="_blank" rel="nofollow" link="external">http://drools-java-rules-engine.46999.n3.nabble.com/ArrayIndexOutOfBounds-when-calling-addKnowledgePackage-tp837841p838997.html</a>

<br>To unsubscribe from ArrayIndexOutOfBounds when calling addKnowledgePackage?, <a target="_blank" rel="nofollow" link="external">click here</a>.
</div>
<br>
</blockquote></div><br>

<br><hr align="left" width="300">
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/ArrayIndexOutOfBounds-when-calling-addKnowledgePackage-tp837841p839339.html">Re: ArrayIndexOutOfBounds when calling addKnowledgePackage?</a><br>
Sent from the <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-User-f47000.html">Drools - User mailing list archive</a> at Nabble.com.<br>