Closed YusukeTobo closed 1 year ago
Hi @cgillum , I wonder what should be the fix here. Jackson cannot desterilized model that doesn't have an empty constructor and the model contains constructor with parameters which didn't annotated its parameters with @JsonProperty("field_name").
Should we update the exception message or should we write this restriction on our documents that when cx is using any class defined themselves them need to provide empty constructor?
@kaibocai I think the first step is to make sure this additional error information is included in the exception we raise.
InvalidDefinitionException@92 "com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of
net.yutobo.durablefunc.Person
(no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator) at [Source: (String)"{"name":"yusuke","age":30}"; line: 1, column: 2]"
Then at least developers can understand what happened without needing to use the debugger.
If no default constructor is generated by javac, the following deserializing warning raises in OrchestrationTrigger. The message is not clear for this library users.
Regarding the java debugger output, this warning is from the exception of Jackson.
Client Function
OrchestrationTrigger