Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

The federated merge function 'ApplyViewToElementsFunction' does not serialise #3025

@tb06904

Description

@tb06904

Describe the bug
When running a GetAllElements or GetElements operation on a federated store using the REST API a server 500 error occurs. As these now use the ApplyViewToElementsFunction by default it appears to be the issue as a google guava type cannot be serialised.

To Reproduce
Run a GetAllElements operation on a federated graph via the REST API.

Expected behavior
The operation returns a federated list of elements

Stack trace and errors
Error output:

{
    "statusCode": 500,
    "status": "Internal Server Error",
    "simpleMessage": "uk.gov.gchq.gaffer.exception.SerialisationException: (was java.lang.UnsupportedOperationException) (through reference chain: uk.gov.gchq.gaffer.federatedstore.operation.FederatedOperation[\"mergeFunction\"]->uk.gov.gchq.gaffer.federatedstore.util.ApplyViewToElementsFunction[\"requiredContextValues\"]->com.google.common.collect.RegularImmutableSet[3])"
}

Additional context
Likely due to missing Jackson module to help serialise the guava types. Adding the Jackson datatype for guava should hopefully fix it.

May also need to add the tag to the relevant method:

@JsonDeserialize(as = ImmutableSet.class)

Metadata

Metadata

Assignees

Labels

bugConfirmed or suspected bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions