Rya*_*son 1 c# cqrs ravendb event-sourcing event-store
试图将JOliver的EventStore与RavenDB连接起来并遇到麻烦.我在Raven中创建了一个名为RavenEventStore的新数据库.
以下是我的连线;
return Wireup.Init()
.UsingRavenPersistence("RavenEventStore")
.UsingAsynchronousDispatchScheduler()
.DispatchTo(new DelegateMessageDispatcher(DispatchCommit))
.Build();
Run Code Online (Sandbox Code Playgroud)
当调用Wireup.Init()时,RavenDb端会发生此异常;
Url:"/ indexes/RavenCommitByDate"Newtonsoft.Json.JsonReaderException:解析值时遇到意外的字符:.第1行,位于1.:Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs中的Newtonsoft.Json.JsonTextReader.ParseValue(Char currentChar):位于Newtonsoft.Json.JsonTextReader.ReadInternal的第699行()位于d:\ Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:第4行,位于d:\中的Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader,Type t,JsonConverter propertyConverter)开发\发布\ Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:第10行,位于d:\ Development\Releases\Json中的Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader,Type objectType)\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:位于c:\ Builds\raven\Raven.Database\Extensions\HttpExtensions.cs中Raven.Database.Extensions.HttpExtensions.ReadJsonObject [T](IHttpContext context)的第118行:第57行在Raven.Database.Server.Responders.Index.Put(IHttpContext conte xt,String index)在c:\ Builds\raven\Raven.Database\Server\Responders\Index.cs:第64行,位于c:\ Builds\raven中的Raven.Database.Server.Responders.Index.Respond(IHttpContext context)\Raven.Database\Server\Responders\Index.cs:位于c:\ Builds\raven\Raven.Database\Server\HttpServer.cs:第477行的Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx)第49行c:\ Builds\raven\Raven.Database\Server\HttpServer.cs中的Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx):第259行
我也可以在RavenDB日志中看到异常;
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Line 1, position 1. at Newtonsoft.Json.JsonTextReader.ParseValue(Char currentChar) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 699 at Newtonsoft.Json.JsonTextReader.ReadInternal() in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 499 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, Type t, JsonConverter propertyConverter) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 1072 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 118 at Raven.Database.Extensions.HttpExtensions.ReadJsonObject[T](IHttpContext context) in c:\Builds\raven\Raven.Database\Extensions\HttpExtensions.cs:line 57 at Raven.Database.Server.Responders.Index.Put(IHttpContext context, String index) in c:\Builds\raven\Raven.Database\Server\Responders\Index.cs:line 64 at Raven.Database.Server.Responders.Index.Respond(IHttpContext context) in c:\Builds\raven\Raven.Database\Server\Responders\Index.cs:line 49 at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx) in c:\Builds\raven\Raven.Database\Server\HttpServer.cs:line 477 at Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx) in c:\Builds\raven\Raven.Database\Server\HttpServer.cs:line 259
Run Code Online (Sandbox Code Playgroud)
我试图通过删除UsingAsynchronousDispatchScheduler()方法消除所有可能性并产生相同的错误.我使用的代码严格来自这里的示例:https: //github.com/joliver/EventStore/blob/master/doc/EventStore.Example/MainProgram.cs
有没有人经历过这个?在Google上也找不到任何东西.
归档时间: |
|
查看次数: |
811 次 |
最近记录: |