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

Unable to deserialize with 'jackson-module-parameter-names', version: '2.9.4' #56

Closed
marcofranssen opened this issue Feb 28, 2018 · 2 comments

Comments

@marcofranssen
Copy link

marcofranssen commented Feb 28, 2018

We are getting following exception with our multimodule project.

Can not construct instance of com.myproject.events.CategoryCreatedEvent: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)
 at [Source: N/A; line: -1, column: -1]

The project structure looks as following:

myproject
`- api
`- events
`- projections

Within projections we try to deserialize the event which is published by api via RabbitMQ. To consume those events we are using our own library which contains the pub sub logic. Also this library has the same jackson-module-parameter-names module included and has the -parameters compiler argument.

Within the unittests in this rabbitmq project the deserializing is actually working. Within this projections library projects it gives the above error.

Is there a limitation on using this accross multiple modules?

We are running it using JDK 1.8.0_152.

@cowtowncoder
Copy link
Member

First of all, this is more of a usage question and belongs here:

https://groups.google.com/forum/#!forum/jackson-user

but as to specific question: no, multiple modules are not problematic, the whole idea is that module interface is designed to allow co-operation of components.
My main guesses would be that either parameter name information is not included everywhere due to compiler or IDE; or that parameter name module is not being registered in one place (different ObjectMapper being used).

@cowtowncoder
Copy link
Member

Would need a reproduction of the problem to help; closing until then.

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

2 participants