dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] [dolphinscheduler-api] "cannot deserialize from Object value" because org/apache/dolphinscheduler/api/utils/PageInfo.java has no default constructor

Open zwZjut opened this issue 5 years ago • 2 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

json string to Result<PageInfo> using org.apache.dolphinscheduler.common.utils.JSONUtils.parseObject(jsonStr,clazz);

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of org.apache.dolphinscheduler.api.utils.PageInfo (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

What you expected to happen

add this to PageInfo.java

public PageInfo() {

}

will solve this problem

How to reproduce

json string to Result<PageInfo> using org.apache.dolphinscheduler.common.utils.JSONUtils.parseObject(jsonStr,clazz);

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of org.apache.dolphinscheduler.api.utils.PageInfo (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

Anything else

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

zwZjut avatar Nov 10 '21 15:11 zwZjut

Hi:

  • Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
  • In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
  • If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/en-us/community/development/subscribe.html ,Then write the issue URL in the email content and send question to [email protected].

github-actions[bot] avatar Nov 10 '21 15:11 github-actions[bot]

done.

zhuangchong avatar Nov 19 '21 09:11 zhuangchong