Drools 6.3.0 DefaultFactHandle NotSerializable exception

74 views
Skip to first unread message

kumar shorav

unread,
Feb 10, 2016, 12:15:29 AM2/10/16
to Drools Usage
Hi All,

We are running drools 6.3.0 on Weblogic 12.1.2 as a stateless EJB 3.0 Bean. The bean returns the following exception when there is more load on the server during the initialization process when it is creating new instances in the pool.

Exception:

EJB Exception: : java.lang.RuntimeException:         java.io.NotSerializableException: org.drools.core.common.DefaultFactHandle
    at org.drools.core.util.ClassUtils.deepClone(ClassUtils.java:514)
    at     org.drools.core.definitions.impl.KnowledgePackageImpl.deepCloneIfAlreadyInUse(Kn    owledgePackageImpl.java:770)
    at     org.drools.core.definitions.impl.KnowledgePackageImpl.deepCloneIfAlreadyInUse(KnowledgePackageImpl.java:66)
at org.drools.core.impl.KnowledgeBaseImpl.addPackages(KnowledgeBaseImpl.java:722)
at org.drools.core.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:266)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:412)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:346)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:498)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:443)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:425)


The code we have to initialize a new stateful session is as below:

protected KieSession kieSession= null;
protected ReleaseId releaseId = null; //fetched by logic to identify the release id>
if(kieSession != null){
    kieSession.dispose();
    kieSession = null;
}
KieServices kServices = KieServices.Factory.get();
KieContainer container = kServices.newKieContainer(this.releaseId);
kieSession = container.newKieSession();

This is happening in the constructor of the Stateless Bean.

Could you help us with any suggestions on resolving this issue?


The same exception is also coming out in the Drools Version 6.1.0


Thanks

Shorav

Thibault Daoulas

unread,
Jun 10, 2016, 6:28:52 AM6/10/16
to Drools Usage
Hi Kumar,

Did you manage to solve your issue?

Mark Proctor

unread,
Jun 10, 2016, 12:45:35 PM6/10/16
to drools...@googlegroups.com
Can you test this against 6.4?

Mark
-- 
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/f064bf0e-9d0f-401f-8dd1-395a807a1be6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages