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

Runtime Exception, No-args constructor issue during Gson mapping #14

Closed
lespaula opened this issue May 24, 2014 · 3 comments
Closed

Runtime Exception, No-args constructor issue during Gson mapping #14

lespaula opened this issue May 24, 2014 · 3 comments

Comments

@lespaula
Copy link

Hi,

I am getting a RuntimeException during queries, also for the most simple one like that:

QueryBuilder qb = QueryBuilder.getInstance();
qb.setStart(10, TimeUnit.HOURS).addMetric("kairosdb.http.ingest_time");
c.client.query(qb);

I am using the dev-branch version. I already tried out some other gson versions, but that didnt help.

Thanks a alot !

Exception in thread "main" java.lang.RuntimeException: No-args constructor for class org.kairosdb.client.response.ErrorResponse does not exist. Register an InstanceCreator with Gson for this type to fix this problem.
at com.google.gson.MappedObjectConstructor.constructWithNoArgConstructor(MappedObjectConstructor.java:64)
.
.
.
at org.kairosdb.client.AbstractClient.query(AbstractClient.java:104)

@lespaula lespaula changed the title Runtime Exception on simple query Runtime Exception, No-args constructor during Gson mapping May 24, 2014
@lespaula lespaula changed the title Runtime Exception, No-args constructor during Gson mapping Runtime Exception, No-args constructor Issue during Gson mapping May 24, 2014
@lespaula lespaula changed the title Runtime Exception, No-args constructor Issue during Gson mapping Runtime Exception, No-args constructor issue during Gson mapping May 24, 2014
@jsabin
Copy link
Contributor

jsabin commented May 28, 2014

Are you using maven to pull down the dependencies? There seems to be dependency difference.

@lespaula
Copy link
Author

Thank you Jeff, it was actually a maven dependency problem. I changed my repo to maven central and it worked.

@jsabin
Copy link
Contributor

jsabin commented May 28, 2014

Glad you were able to resolve it.

On Wed, May 28, 2014 at 2:19 PM, lespaula notifications@github.com wrote:

Thank you Jeff, it was actually a maven dependency problem. I changed my
repo to maven central and it woked.


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-44459004
.

@jsabin jsabin closed this as completed May 14, 2015
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