MeltwaterArchive / datasift-java

Java client to interface with DataSift
http://www.datasift.com/
MIT License
10 stars 7 forks source link

/historics/prepare call failing #118

Closed dugjason closed 4 years ago

dugjason commented 7 years ago
PreparedHistoricsQuery query = 
datasift.historics().prepare(stream.hash(), fiveHrsAgo, fourHrsAgo, 
name).sync();

causes an error:

com.datasift.client.exceptions.JsonParsingException: Unable to decode 
JSON from DataSift response 
at 
com.datasift.client.DataSiftApiClient$1.apply(DataSiftApiClient.java:52) 
at 
com.datasift.client.DataSiftApiClient$1.apply(DataSiftApiClient.java:37) 
at io.higgs.http.client.readers.PageReader.done(PageReader.java:24) 
at io.higgs.http.client.readers.Reader.setCompleted(Reader.java:85) 
at io.higgs.http.client.Response.setCompleted(Response.java:103) 
at 
io.higgs.http.client.ClientHandler.channelRead0(ClientHandler.java:65) 
at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) 
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) 
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) 
at 
io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) 
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) 
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) 
at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) 
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) 
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) 
at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244) 
at 
io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147) 
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) 
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) 
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1069) 
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:939) 
at 
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:327) 
at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230) 
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308) 
at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294) 
at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846) 
at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) 
at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) 
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) 
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) 
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) 
at 
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111) 
at java.lang.Thread.run(Unknown Source) 
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not 
deserialize instance of java.util.LinkedHashMap out of START_ARRAY token 
at [Source: java.io.StringReader@16beb40c; line: 1, column: 93] 
(through reference chain: 
com.datasift.client.historics.PreparedHistoricsQuery["availability"]->com.datasift.client.historics.Availability["sources"]) 
at 
com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164) 
at 
com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:599) 
at 
com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:593) 
at 
com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:306) 
at 
com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:26) 
at 
com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:375) 
at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:98) 
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:308) 
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121) 
at 
com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:375) 
at 
com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:107) 
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:308) 
at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121) 
at 
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2796) 
at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942) 
at 
com.datasift.client.DataSiftApiClient$1.apply(DataSiftApiClient.java:49) 
... 32 more