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

Cannot initialise deploy parameters field (no delegate- or property-based Creator) #53

Open
rach-id opened this issue Jul 6, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@rach-id
Copy link
Contributor

rach-id commented Jul 6, 2020

radish34/Registrar : Problem with initializing the address while deploying:

DeployParameters:
data class RegistrarDeployParameters(
  val ERC1820RegistryAddress: String
)
Error:
{
  "title": "Cannot construct instance of `com.gen.app.core.registrar.model.RegistrarDeployParameters` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 2]",
  "responseStatus": 400,
  "requestMethod": "POST",
  "requestUrl": "http://localhost:9090/testApp/contracts/registrar",
  "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
}
How to make it work ?

Add another field to the data class and everything works fine:

data class RegistrarDeployParameters(
  val ERC1820RegistryAddress: String,
  val something: Int
)

In forums, they say to add default constructor, but that doesn't work as the value being sent in the request gets omitted.
Another suggestion is adding the jackson-module-kotlin dependency. However, we already have that.

Edit: The following contracts too: EnumerableMapMock

@rach-id rach-id added the bug Something isn't working label Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant