Closed thoughtmanifest closed 7 years ago
I believe this happens when toConvertable is called with a Numeric Type. The Numeric type is supported in the DataConverters, but not here in the toObject DataConverter: https://github.com/alaisi/postgres-async-driver/blob/master/src/main/java/com/github/pgasync/impl/conversion/DataConverter.java#L179-L180
I'm guessing it was meant to call toDouble or toBigDecimal, which seems to be indicated in this past commit: https://github.com/alaisi/postgres-async-driver/commit/e9fc76fc397cc856d890a298d8b130f101a6e708
Here's the stacktrace:
#error { :cause "Unknown conversion source: NUMERIC" :via [{:type java.lang.IllegalStateException :message "Unknown conversion source: NUMERIC" :at [com.github.pgasync.impl.conversion.DataConverter toConvertable "DataConverter.java" 211]}] :trace [[com.github.pgasync.impl.conversion.DataConverter toConvertable "DataConverter.java" 211] [postgres.async.proxy$com.github.pgasync.impl.conversion.DataConverter$ff19274a toConvertable nil -1] [com.github.pgasync.impl.conversion.DataConverter toObject "DataConverter.java" 206] [postgres.async.proxy$com.github.pgasync.impl.conversion.DataConverter$ff19274a toObject nil -1] [postgres.async$create_converter$fn__10235$fn__10236 invoke "async.clj" 24] [clojure.core$proxy_call_with_super invokeStatic "core_proxy.clj" 368] [clojure.core$proxy_call_with_super invoke "core_proxy.clj" 364] [postgres.async$create_converter$fn__10235 invoke "async.clj" 24] [postgres.async.proxy$com.github.pgasync.impl.conversion.DataConverter$ff19274a toObject nil -1] [com.github.pgasync.impl.PgRow get "PgRow.java" 228] [postgres.async.impl$row__GT_map invokeStatic "impl.clj" 31] [postgres.async.impl$row__GT_map invoke "impl.clj" 28] [clojure.core$partial$fn__4759 invoke "core.clj" 2516] [clojure.core.protocols$iter_reduce invokeStatic "protocols.clj" 49] [clojure.core.protocols$fn__6742 invokeStatic "protocols.clj" 75] [clojure.core.protocols$fn__6742 invoke "protocols.clj" 75] [clojure.core.protocols$fn__6684$G__6679__6697 invoke "protocols.clj" 13] [clojure.core$reduce invokeStatic "core.clj" 6545] [clojure.core$reduce invoke "core.clj" 6527] [postgres.async.impl$result__GT_map$fn__10175 invoke "impl.clj" 37] [clojure.core$map$fn__4785 invoke "core.clj" 2646] [clojure.lang.LazySeq sval "LazySeq.java" 40] [clojure.lang.LazySeq seq "LazySeq.java" 49] [clojure.lang.RT seq "RT.java" 521] [clojure.lang.LazilyPersistentVector create "LazilyPersistentVector.java" 44] [clojure.core$vec invokeStatic "core.clj" 377] [clojure.core$vec invoke "core.clj" 367] [postgres.async.impl$result__GT_map invokeStatic "impl.clj" 36] [postgres.async.impl$result__GT_map invoke "impl.clj" 33] [postgres.async$execute_BANG_$reify__10256 accept "async.clj" 59] [rx.internal.util.ActionSubscriber onNext "ActionSubscriber.java" 39] [rx.observers.SafeSubscriber onNext "SafeSubscriber.java" 139] [rx.internal.operators.OperatorMerge$MergeSubscriber emitScalar "OperatorMerge.java" 391] [rx.internal.operators.OperatorMerge$MergeSubscriber tryEmit "OperatorMerge.java" 353] [rx.internal.operators.OperatorMerge$InnerSubscriber onNext "OperatorMerge.java" 838] [rx.internal.operators.OperatorDoOnEach$1 onNext "OperatorDoOnEach.java" 85] [com.github.pgasync.impl.PgConnection$2 onNext "PgConnection.java" 160] [com.github.pgasync.impl.PgConnection$2 onNext "PgConnection.java" 145] [com.github.pgasync.impl.netty.NettyPgProtocolStream$1 onNext "NettyPgProtocolStream.java" 204] [com.github.pgasync.impl.netty.NettyPgProtocolStream$5 channelRead "NettyPgProtocolStream.java" 299] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 348] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 334] [io.netty.channel.AbstractChannelHandlerContext fireChannelRead "AbstractChannelHandlerContext.java" 326] [io.netty.handler.codec.ByteToMessageDecoder fireChannelRead "ByteToMessageDecoder.java" 293] [io.netty.handler.codec.ByteToMessageDecoder channelRead "ByteToMessageDecoder.java" 267] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 348] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 334] [io.netty.channel.AbstractChannelHandlerContext fireChannelRead "AbstractChannelHandlerContext.java" 326] [io.netty.handler.codec.ByteToMessageDecoder fireChannelRead "ByteToMessageDecoder.java" 293] [io.netty.handler.codec.ByteToMessageDecoder channelRead "ByteToMessageDecoder.java" 267] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 348] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 334] [io.netty.channel.AbstractChannelHandlerContext fireChannelRead "AbstractChannelHandlerContext.java" 326] [io.netty.channel.DefaultChannelPipeline$HeadContext channelRead "DefaultChannelPipeline.java" 1320] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 348] [io.netty.channel.AbstractChannelHandlerContext invokeChannelRead "AbstractChannelHandlerContext.java" 334] [io.netty.channel.DefaultChannelPipeline fireChannelRead "DefaultChannelPipeline.java" 905] [io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe read "AbstractNioByteChannel.java" 123] [io.netty.channel.nio.NioEventLoop processSelectedKey "NioEventLoop.java" 563] [io.netty.channel.nio.NioEventLoop processSelectedKeysOptimized "NioEventLoop.java" 504] [io.netty.channel.nio.NioEventLoop processSelectedKeys "NioEventLoop.java" 418] [io.netty.channel.nio.NioEventLoop run "NioEventLoop.java" 390] [io.netty.util.concurrent.SingleThreadEventExecutor$5 run "SingleThreadEventExecutor.java" 742] [io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator run "DefaultThreadFactory.java" 145] [java.lang.Thread run "Thread.java" 745]]}
I believe this happens when toConvertable is called with a Numeric Type. The Numeric type is supported in the DataConverters, but not here in the toObject DataConverter: https://github.com/alaisi/postgres-async-driver/blob/master/src/main/java/com/github/pgasync/impl/conversion/DataConverter.java#L179-L180
I'm guessing it was meant to call toDouble or toBigDecimal, which seems to be indicated in this past commit: https://github.com/alaisi/postgres-async-driver/commit/e9fc76fc397cc856d890a298d8b130f101a6e708
Here's the stacktrace: