Skip to content

Anonymous inner classes - PersistenceExceptionTypeNotPersistable #159

@rpx99

Description

@rpx99

Playing around with wicket and plugged in eclipse serializer.

Generally seems to work, but in wicket a lot of anonymous inner classes are used, e.g. for AjaxLinks.

That seems to be a problem for eclipse serializer (bit of a bummer).

Found some stack overflow posts:

Link 1

Link 2

According to the Features
anonymous inner classes
are supported.

But the exception says it's not:

Details: Synthetic classes ($1 etc.) are not reliably persistence since a simple reordering of source code elements would change the name identity of a class. For a type system that has to rely upon resolving types by their identifying name, this would silently cause a potentially fatal error. If handling synthetic classes (e.g. anonymous inner classes) is absolutely necessary, a custom one.microstream.persistence.types.PersistenceTypeResolver can be used to remove the exception and assume complete responsibility for correctly handling synthetic class names.

There seems to be the possibility to use the a custom type handler.

What about the solution mentioned in Link 2?
How do other serializers do it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions