简体   繁体   English

Riak&Java - com.fasterxml.jackson.core.JsonParseException:意外的字符('<'(代码60))

[英]Riak & Java - com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60))

I'm trying to execute this code (I deployed Riak on a Master/Slave cluster). 我正在尝试执行此代码(我在主/从集群上部署了Riak)。 I'm using Riak's JAVA API: 我正在使用Riak的JAVA API:

import com.basho.riak.client.IRiakClient;
import com.basho.riak.client.IRiakObject;
import com.basho.riak.client.RiakException;
import com.basho.riak.client.RiakFactory;
import com.basho.riak.client.bucket.Bucket;

public class RiakTest {


public static void main(String[] args) throws RiakException
{

    String myData = "This is my data";
    IRiakClient riakClient = RiakFactory.httpClient("http://riak.master.ip.adress:8098");

    Bucket myBucket = riakClient.fetchBucket("TestBucket").execute();
    myBucket.store("TestKey", myData).execute();
    riakClient.shutdown();

}


}

And I have this error raised: 我提出了这个错误:

Exception in thread "main" com.basho.riak.client.RiakRetryFailedException: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: java.io.StringReader@1394894; line: 1, column: 2]
at com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:79)
at com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)
at com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)
at com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)
at com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:53)
at com.basho.riak.client.bucket.FetchBucket.execute(FetchBucket.java:72)
at RiakTest.main(RiakTest.java:16)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: java.io.StringReader@1394894; line: 1, column: 2]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1369)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleUnexpectedValue(ReaderBasedJsonParser.java:1379)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:669)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2926)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2873)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)
at com.basho.riak.client.raw.http.ConversionUtil.convert(ConversionUtil.java:362)
at com.basho.riak.client.raw.http.HTTPClientAdapter.fetchBucket(HTTPClientAdapter.java:329)
at com.basho.riak.client.bucket.FetchBucket$1.call(FetchBucket.java:74)
at com.basho.riak.client.bucket.FetchBucket$1.call(FetchBucket.java:72)
at com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:72)
... 6 more

Do you have any idea where the problem could come from ? 你知道问题可能来自哪里吗?

Thanks 谢谢

Because that's not a valid Riak URL. 因为那不是有效的Riak URL。

It should be http://riak.master.ip.adress:8098/riak 它应该是http://riak.master.ip.adress:8098/riak

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 RestTemplate::exchange() - com.fasterxml.jackson.core.JsonParseException:意外字符('&lt;'(代码 60)) - RestTemplate::exchange() - com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)) com.fasterxml.jackson.core.JsonParseException:意外的字符(&#39;\\&#39;(代码92))[Java] - com.fasterxml.jackson.core.JsonParseException: Unexpected character ('\' (code 92)) [Java] com.fasterxml.jackson.core.JsonParseException:意外的字符 - com.fasterxml.jackson.core.JsonParseException: Unexpected character Google Http客户端库Java:com.fasterxml.jackson.core.JsonParseException:意外字符(“ G” - Google Http Client Library java: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('G' com.fasterxml.jackson.core.JsonParseException:读取json文件时出现意外字符(代码160) - com.fasterxml.jackson.core.JsonParseException: Unexpected character(code 160) while reading the json file com.fasterxml.jackson.core.JsonParseException:无法识别的字符转义符&#39;U&#39;(代码85) - com.fasterxml.jackson.core.JsonParseException: Unrecognized character escape 'U' (code 85) 如何使无法识别的字符转义 &#39;.&#39; (代码 46)被识别 - com.fasterxml.jackson.core.JsonParseException - How to make Unrecognized character escape '.' (code 46) to be Recognized - com.fasterxml.jackson.core.JsonParseException 错误 com.fasterxml.jackson.core.JsonParseException:无法识别的令牌 - Error com.fasterxml.jackson.core.JsonParseException: Unrecognized token com.fasterxml.jackson.core.JsonParseException是否为* .json.swp? - com.fasterxml.jackson.core.JsonParseException for *.json.swp? 找不到com.fasterxml.jackson.core.JsonParseException的类文件 - class file for com.fasterxml.jackson.core.JsonParseException not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM