linagora / james-project

Mirror of Apache James Project
Apache License 2.0
69 stars 63 forks source link

[BUG] Missing guice binding JsonEventSerializer for PostgresEventStoreDAO #5143

Closed vttranlina closed 2 months ago

vttranlina commented 2 months ago

When testing on local I got an error

org.apache.james.eventsourcing.eventstore.JsonEventSerializer$UnknownEventException: org.apache.james.json.JsonGenericSerializer$UnknownTypeException: unknown type class org.apache.james.jmap.api.filtering.impl.IncrementalRuleChange
    at org.apache.james.eventsourcing.eventstore.JsonEventSerializer.serialize(JsonEventSerializer.scala:76)
    at org.apache.james.eventsourcing.eventstore.postgres.PostgresEventStoreDAO.convertToJooqJson(PostgresEventStoreDAO.java:78)

It looks like we missing guice binding for creating instance JsonEventSerializer

The modules: util.Set[EventDTOModule[_ <: Event, _ <: EventDTO]] has size = 1, it quite smell, (for cassandra, it has size 15)

vttranlina commented 2 months ago

How to reproduce?

vttranlina commented 2 months ago

After update guice binding in sporadic pull requests It looks normal now

modules size : 13
nestedTypesModules size : 62