Hi ,
streamBucket method of RiakClient throws this exception when i tried
using it .
Exception in thread "main" java.lang.NoSuchMethodError:
org.json.JSONTokener.end()Z
at
com.basho.riak.client.response.StreamedKeysCollection.cacheNext(StreamedKeysCollection.java:45)
at
com.basho.riak.client.util.CollectionWrapper$WrappedCollectionIterator.hasNext(CollectionWrapper.java:123)
at RiakPerfTest.cleanUpRiak(RiakPerfTest.java:109)
at RiakPerfTest.main(RiakPerfTest.java:94)
I used it exactly in the same way as said in github wiki .
Later reading the source Code of riak , I found that the problem lies in
StreamedKeysCollection Class of package com.basho.riak.client.response.
while (!tokens.end()) {
char c = tokens.nextClean();
if ((!readingArray && c == '[') || (readingArray && c ==
',')) {
if (tokens.nextClean() != ']') {
tokens.back();
readingArray = true;
cache(tokens.nextValue().toString());
return true;
}
} else if (readingArray && c == ']') {
readingArray = false;
} else if (c == '\\') {
tokens.nextClean(); // skip over escaped chars
}
}
while (!tokens.end()) { // -> Method end() is not defined in JSONTokener
Class
There is a method named more() defined in JSONTokener Class , I was able
to successfully retrieve all the keys when i replaced end() method with
more() .
Please throw some light if i am using the api's wrongly .
--
Santhosh
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com