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

Active Tasks class is not up to date #283

Open
MPickett1 opened this issue Feb 13, 2018 · 2 comments
Open

Active Tasks class is not up to date #283

MPickett1 opened this issue Feb 13, 2018 · 2 comments

Comments

@MPickett1
Copy link

When attempting to print all Active Tasks, I receive this error:

Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "node" (class org.ektorp.impl.StdReplicationTask), not marked as ignorable (17 known properties: "doc_id", "pid", "continuous", "target", "docs_written", "checkpointed_source_seq", "docs_read", "source", "checkpoint_interval", "started_on", "revisions_checked", "missing_revisions_found", "updated_on", "progress", "replication_id", "doc_write_failures", "source_seq"])
 at [Source: org.ektorp.http.StdHttpResponse$ConnectionReleasingInputStream@6a1d406e; line: 1, column: 1425] (through reference chain: java.util.ArrayList[0]->org.ektorp.impl.StdReplicationTask["node"])

I figure since it can't find the node field, I will just supply my own ObjectMapper to the CouchDbInstance, which then leads me to this error:

Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of java.lang.Long from String value 'replication': not a valid Long value
 at [Source: org.ektorp.http.StdHttpResponse$ConnectionReleasingInputStream@2d6d28e2; line: 1, column: 793] (through reference chain: java.util.ArrayList[0]->org.ektorp.impl.StdReplicationTask["checkpointed_source_seq"])

It seems that in CouchDB 2.0 they changed the checkpointed_source_seq to a String, with the number and the revision.

@YannRobert
Copy link
Collaborator

Yes, some data types have changed with CouchDB 2.0, and Ektorp is not easy to change to support that without breaking changes for existing users.

@MPickett1
Copy link
Author

I attempted a fix for my own personal use and it still did not work.

I added the node field in the ActiveTask interface, along with the accompanying StdActiveTask implementation. I also changed the checked_source_seq from long to String and those accompanying implementations as well.

When I packaged it and included it in my project I still got those same errors, even though I checked to make sure that it was referencing the correct updated files.

Any ideas on why that was?

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