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 :)

On Mon, May 24, 2010 at 12:59 AM, Wolfgang Laun-2 [via Drools - Java Rules Engine] <[hidden email]> wrote:
On 23 May 2010 15:31, malkhafaji <[hidden email]> wrote:

Hello,

I am trying to create a bunch of KnowledgeBase objects, this is what I am
doing:

1. create one List of KnowledgePackage objects (pre-compile them).
2. Create X number of KnowledgeBases, and for each knowledge base do this:

for (KnowledgePackage kp : this.knowledgePackages) {
                               Collection<KnowledgePackage> collections = new
ArrayList<KnowledgePackage>();
                               collections.add(kp);
                               knowledgeBase.addKnowledgePackages(collections);
                       }

This is a very circumstantial way of doing

   knowledgeBase.addKnowledgePackages( this.knowledgePackages );

-W

_______________________________________________
rules-users mailing list
[hidden email]

View message @ http://drools-java-rules-engine.46999.n3.nabble.com/ArrayIndexOutOfBounds-when-calling-addKnowledgePackage-tp837841p838997.html
To unsubscribe from ArrayIndexOutOfBounds when calling addKnowledgePackage?, click here.




View this message in context: Re: ArrayIndexOutOfBounds when calling addKnowledgePackage?
Sent from the Drools - User mailing list archive at Nabble.com.