[jboss-jira] [JBoss JIRA] Commented: (JBRULES-945) Can't passivate WorkingMemory with JBoss cache because ActivationGroupImpl is not serializable

Gilles Dubuc (JIRA) jira-events at lists.jboss.org
Mon Jun 25 21:14:16 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBRULES-945?page=comments#action_12366772 ] 
            
Gilles Dubuc commented on JBRULES-945:
--------------------------------------

Just adding the "implements Serializable" statement to the declaration of the ActivationGroupImpl didn't seem to be sufficient.
JBoss cache stopped throwing exceptions on passivation, but when trying to fetch the working memory from the database later on (after AS restart) the following happened:

java.sql.SQLException: Unable to load to deserialize result: java.lang.ClassNotFoundException: No ClassLoaders found for: com.smsc.mitto.rules.Rule_21_0ConsequenceInvoker

I'm not sure why this specific part of a rule is missing. I'm guessing that probably persisting the working memory is useless if the RuleBase it came from is not there anymore when we try todeserialize the working memory.

> Can't passivate WorkingMemory with JBoss cache because ActivationGroupImpl is not serializable
> ----------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-945
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-945
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.0.6
>         Environment: JBoss AS 4.2 + JBoss Cache + JBoss Rules 3.0.6
>            Reporter: Gilles Dubuc
>         Assigned To: Mark Proctor
>
> When attempting to put a WorkingMemory that contains rules relying on activation groups into a TreeCache (which passivates with a JDBC connection), the following happens:
> 16:55:00,925 ERROR [JDBCCacheLoader] Failed to insert node: org.drools.common.ActivationGroupImpl
> java.io.NotSerializableException: org.drools.common.ActivationGroupImpl
> ...
> Surely enough, checking the javadoc (4.0 included) shows that indeed ActivationGroupImpl is not serializable.
> And strangely its "cousin" AgendaGroupImpl is serializable.
> Any particular reason why ActivationGroupImpl is not serializable?
> It prevents us from caching our working memories, we'll have to passivate the rule bases instead, which has a big performance impact on our rule-heavy system. I hope there's an easy fix to that.
> In the meantime, I'll try to simply modify the source code to add "implements Serializable" to that class and see what happens. I'll add findings here.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list