-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
BTC-China getTrades() ClassCastException #517
Comments
Can you please try the latest snapshot jars and report back? |
Yes, this occurs with the most recent snapshot JARS.
|
I cannot reproduce this problem either, by running |
What version of Java are you using?
|
java version "1.6.0_65" |
I had the same issue for Justcoin, and another user was able to get code
|
Cannot reproduced in Java 1.7 either. |
@zholmes1 Can you try out writing a custom deserializer for BTCChinaTrade that you can get working in your environment as well as a non-andriod vm? If you search the codebase for 'JsonDeserializer' you will find plenty of examples. This isn't a preferred solution as it is just more code to maintain. Otherwise this seems like it should be an issue with whatever version of Jackson you are using. |
I didn't consider that it could be Jackson. I will add the correct version
|
Sorry for the delay. I updated Jackson to 2.3 and I am still having this issue. |
I guess if we change the return type of @GET
@Path("data/historydata")
public List<BTCChinaTrade> getTrades(
@QueryParam("market") String market,
@QueryParam("since") long since,
@QueryParam("limit") int limit) throws IOException; |
can you post the exact line of code in |
Does running |
I believe the issue is that in In
There's some more possibly useful info here that could be used perhaps in However to get this working now, you can do what @sutra suggested and change the return type to If you look in Justcoin, the rest interface methods also return |
Found it was using array before 31cf69a, how about changing back to use array, and avoid using generic type for return type of getTicker too. @jamespedwards42 |
It'd be easier to try |
I don't think |
Hey, I'm working on a Poloniex implementation and I was getting this error when I was parsing the returned JSON as a A simple switch to |
I would be willing to help out with migrating all of the exchanges to use primitive arrays. I think we could just throw up a wiki page and start claiming each exchange one by one. |
That's excellent! As a committer, can you create/edit Wiki pages? |
I've opened an issue in rescu for @timmolter 's suggestion. |
@zholmes1 This should now be fixed in the latest snapshot version. Can you please test and close this issue if it's OK? |
Yes I will test it out tonight.
|
Everything is working perfectly. |
…ockito-mockito-core-3.3.0 Bump mockito-core from 3.2.4 to 3.3.0
I have the same issue with JustcoinExchange
Then happens when the getTrades(CurrencyPair) method is called.
The text was updated successfully, but these errors were encountered: