Upgrade from 7.27.0.Final to 8.44.0.Final - java.io.NotSerializableException

29 views
Skip to first unread message

ankur singhal

unread,
Jul 3, 2024, 12:55:27 AMJul 3
to Drools Setup
Hi,

I am upgrading from 7.27.0 to 8.44.0 and facing issue of NotSerializableException.

Caused by: java.io.NotSerializableException: org.drools.kiesession.rulebase.SessionsAwareKnowledgeBase

Any suggestion on this?

Thanks in advance.

Toshiya Kobayashi

unread,
Jul 8, 2024, 11:06:11 PMJul 8
to Drools Setup
Hi,

https://docs.drools.org/latest/drools-docs/drools/KIE/index.html
```
KieBase and KiePackage don’t support serialization since Drools 6.
You need to build KieBase through KieContainer.
On the other hand, KieSession can be marshalled/unmarshalled by KieMashaller. See Marshalling.
```

Indeed, kbase serialization is not supported since Drools 6. I admit that it's confusing to users that KnowledgeBaseImpl had been implementing Externalizable/Serializable in Drools 6 and 7 (because in some cases, serialization worked). So eventually, Externalizable/Serializable is removed.

Probably you stored a kbase and deserialized it after JVM reboot, but in such a case, you need to build a new KieBase (via kjar or programmatically).

Regards,
Toshiya

2024年7月3日水曜日 13:55:27 UTC+9 anku...@gmail.com:
Reply all
Reply to author
Forward
0 new messages