Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Problems with custom deserializer, UnknownFieldSet #111

Closed
xstephen95x opened this issue Dec 17, 2018 · 5 comments
Closed

Question: Problems with custom deserializer, UnknownFieldSet #111

xstephen95x opened this issue Dec 17, 2018 · 5 comments
Assignees

Comments

@xstephen95x
Copy link

After creating a custom deserializer, and uploading into the app, I get the following when trying to view a View which uses that message format.

 Error Type definition error: [simple type, class com.google.protobuf.UnknownFieldSet$Parser]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.google.protobuf.UnknownFieldSet$Parser and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.sourcelab.kafka.webview.ui.manager.kafka.dto.KafkaResults["results"]->java.util.Collections$UnmodifiableRandomAccessList[0]-

Is there anyway to avoid this? #75 looks like it tried to mitigate this, but im still seeing it on master HEAD

@xstephen95x
Copy link
Author

Or does the data type returned by the deserializer need to be a string?

@Crim
Copy link
Collaborator

Crim commented Dec 18, 2018

So I believe a short term solution would be to return a string. I feel like it should work with the changes in #76

I have a custom deserializer for protobufs that I use, I'll review how I'm using it. I'll post back with what I find.

@Crim
Copy link
Collaborator

Crim commented Dec 18, 2018

So I'm updating the linked PR to register a protocol buffer module for jackson, which should allow it to serialize properly without issues.

@Crim
Copy link
Collaborator

Crim commented Dec 20, 2018

I've published a new release. I believe this should resolve your issue. Please re-open if you continue to have problems.

Thanks!

@Crim Crim closed this as completed Dec 20, 2018
@Crim Crim self-assigned this Dec 20, 2018
@geuno-gil
Copy link

In my case, server uses not ProtobufHttpMessageConverter but MappingJackson2HttpMessageConverter
You should add accept header to use application/x-protobuf. Then serialization will be okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants