Caused by: org.hibernate.type.SerializationException: could not deserialize
Description
Activity
Sam Ottenhoff March 4, 2024 at 2:44 PM
My resolution, thanks to Brian, was deleting the resumption data (e.g., where a student left off):
truncate table SCORM_ACTIVITY_TREE_HOLDER_T
Brian J. January 8, 2024 at 2:52 PMEdited
@Sam Ottenhoff sorry for the late response, I’ve been on vacation since mid December. I do have some information on this though, as we recently ran into this issue as well.
This issue was introduced with the Wicket 8 upgrade (SCO-117). Prior to this work, the ActivityTree
thing (which extended Wicket’s TreeView
) was marked as Serializable
. The purpose/intention of this serialization was (and still is) unknown, and at the time when we were doing the Wicket 8 upgrade we actually failed to even recognize that it was being serialized and deserialized at all. The Wicket 8 upgrade necessitated redeveloping the ActivityTree
basically from scratch, because of breaking changes in Wicket’s TreeView
between versions 4 and 8. The result is that after the upgrade, ActivityTree
is no longer Serializable
.
So this issue will only crop up for users who had previously taken (and probably not finished) a module back when the SCORM Tool was the Wicket 4 version (1.4.15), and then tries to take or resume the same module in the same site after the SCORM Tool was updated to Wicket 8.
In our experience, this issue has only ever come up once, and in that case it was enough for our client to just take the module in a different site, or to upload a second version of the module in the same site, and deactivate or remove the offending copy. Another potential fix is to delete the corresponding row(s) in SCORM_ACTIVITY_TREE_HOLDER_T
for the user’s attempt for the given module in the given site.
Any users who had not taken the module in the affected site prior to the Wicket upgrade (or if they did not have any abandoned or incomplete attempts) would be able to access the module successfully.
Sam Ottenhoff December 18, 2023 at 10:26 PM
I’m wondering if anyone else upgraded from 12 > 20+ and what happened to old content serialized in database?
Sam Ottenhoff December 18, 2023 at 7:22 PM
@Brian J. @Earle Nietzel just looking for some guidance here….
So ActivityTreeHolderDaoImpl is retrieving from DB:
+ List r = getHibernateTemplate().getSessionFactory().getCurrentSession()
+ .createQuery("from " + ActivityTreeHolder.class.getName() + " where contentPackageId=:cpid and learnerId=:lid")
+ .setParameter("cpid", contentPackageId)
+ .setParameter("lid", learnerId)
+ .getResultList();
And Hibernate is automatically deserializing the blob? Into what exactly?
After upgrading from Sakai 12 to Sakai 22, this is the error I receive:
Caused by: org.hibernate.type.SerializationException: could not deserialize at org.hibernate.internal.util.SerializationHelper.doDeserialize(SerializationHelper.java:231) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.internal.util.SerializationHelper.deserialize(SerializationHelper.java:287) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.fromBytes(SerializableTypeDescriptor.java:138) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:113) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:29) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:60) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3025) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1844) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.hydrateEntityState(Loader.java:1772) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1745) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.getRow(Loader.java:1598) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:742) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.processResultSet(Loader.java:1002) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.doQuery(Loader.java:960) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:351) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.doList(Loader.java:2787) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.doList(Loader.java:2770) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2604) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.Loader.list(Loader.java:2599) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:505) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:395) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1526) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1598) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1566) ~[hibernate-core-5.3.20.Final.jar:5.3.20.Final] ... 113 more Caused by: java.io.InvalidClassException: javax.swing.event.EventListenerList; local class incompatible: stream classdesc serialVersionUID = -5677132037850737084, local class serialVersionUID = -7977902244297240866