Hello,

After adding a few hundred rules, and with the same code, KnowledgeBase 
serialization has started to generate StackOverflowError. I have increased the 
VM stack size as a workaround, but I was hoping to implement something more 
robust.

I specifically need to serialize the KnowledgeBase, and not the session.

I'm using this code:

    private void dumpKnowledgeBase(String file, KnowledgeBase kbase) {
           try {
               FileOutputStream ostream = new FileOutputStream(file);
               DroolsObjectOutputStream p = new 
DroolsObjectOutputStream(ostream);
               p.writeObject(kbase);
               p.flush();
               ostream.close();
           }
           catch (Exception e) {
               System.err.println(e);
               e.printStackTrace();
               System.err.println("Could not write knowledge base "+file);
           }
    }


This is due to writeObject recursion? Any ideas?

A.


      
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to