You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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)
The text was updated successfully, but these errors were encountered:
I'd suggest investigating if we need to use this Guava type or if a regular Java 8 type would work instead. It if it did and that fixed this error then it would be a preferred solution.
Most of the uses of Guava in Gaffer are not needed and seem to be an artifact of pre-Java 8 design. Once Gaffer moves to supporting only Java 11, Guava could probably be removed entirely. As such, we should avoid introducing code reliant on Guava if this can easily be avoided.
I'd suggest investigating if we need to use this Guava type or if a regular Java 8 type would work instead. It if it did and that fixed this error then it would be a preferred solution.
Most of the uses of Guava in Gaffer are not needed and seem to be an artifact of pre-Java 8 design. Once Gaffer moves to supporting only Java 11, Guava could probably be removed entirely. As such, we should avoid introducing code reliant on Guava if this can easily be avoided.
Good point if we were using Java 9+ then this could be fixed by using a Set.of() which would produce the required immutable set as is I think Java 8 can use Collections.unmodifiableSet() instead so might be a better fix.
Describe the bug
When running a
GetAllElements
orGetElements
operation on a federated store using the REST API a server 500 error occurs. As these now use theApplyViewToElementsFunction
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:
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:
The text was updated successfully, but these errors were encountered: