KSQLDB在Wildfly中执行查询抛出NoSuchMethodError问题求助
问题描述
每次调用executeQuery时都会挂起并抛出NoSuchMethodError异常,但在不含Wildfly的简单main函数项目中测试该代码可正常运行。
测试代码
public void test() throws ExecutionException, InterruptedException { Client client = Client.create(ClientOptions.create() .setHost("localhost") .setPort(8088)); HashMap<String, Object> props = new HashMap<>(); String sql = "SELECT * FROM SomeTable;"; List<Row> rows = client.executeQuery(sql, props).get(); for(Row row : rows) { System.out.println(row); } client.close(); }
错误信息
15:32:06,698 ERROR [io.confluent.shaded.io.vertx.core.impl.ContextBase] (vert.x-eventloop-thread-1) Unhandled exception: java.lang.NoSuchMethodError: 'void io.confluent.ksql.util.VertxUtils.checkContext(io.confluent.shaded.io.vertx.core.Context)' at deployment.myproject-1.0.war//io.confluent.ksql.api.client.impl.ResponseHandler.checkContext(ResponseHandler.java:59) at deployment.myproject-1.0.war//io.confluent.ksql.api.client.impl.ResponseHandler.handleBodyBuffer(ResponseHandler.java:38) at deployment.myproject-1.0.war//io.confluent.ksql.api.client.impl.ExecuteQueryResponseHandler.handleBodyBuffer(ExecuteQueryResponseHandler.java:37) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.parsetools.impl.RecordParserImpl.handleParsing(RecordParserImpl.java:214) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.parsetools.impl.RecordParserImpl.lambda$handler$0(RecordParserImpl.java:316) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:246) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.HttpEventHandler.handleEnd(HttpEventHandler.java:76) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.HttpClientResponseImpl.handleEnd(HttpClientResponseImpl.java:250) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.Http2ClientConnection$StreamImpl.handleEnd(Http2ClientConnection.java:450) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.VertxHttp2Stream.lambda$new$1(VertxHttp2Stream.java:63) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:239) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:129) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.impl.EventLoopContext.emit(EventLoopContext.java:55) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.impl.ContextBase.emit(ContextBase.java:239) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.VertxHttp2Stream.onEnd(VertxHttp2Stream.java:135) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.Http2ClientConnection$Stream.onEnd(Http2ClientConnection.java:277) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.VertxHttp2Stream.onEnd(VertxHttp2Stream.java:130) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.Http2ConnectionBase.onDataRead(Http2ConnectionBase.java:315) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.Http2FrameListenerDecorator.onDataRead(Http2FrameListenerDecorator.java:36) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.Http2EmptyDataFrameListener.onDataRead(Http2EmptyDataFrameListener.java:49) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onDataRead(DefaultHttp2ConnectionDecoder.java:307) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readDataFrame(DefaultHttp2FrameReader.java:415) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.processPayloadState(DefaultHttp2FrameReader.java:250) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.DefaultHttp2FrameReader.readFrame(DefaultHttp2FrameReader.java:159) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder.decodeFrame(DefaultHttp2ConnectionDecoder.java:173) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.DecoratingHttp2ConnectionDecoder.decodeFrame(DecoratingHttp2ConnectionDecoder.java:63) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler$FrameDecoder.decode(Http2ConnectionHandler.java:393) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:453) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) at deployment.myproject-1.0.war//io.confluent.shaded.io.vertx.core.http.impl.VertxHttp2ConnectionHandler.channelRead(VertxHttp2ConnectionHandler.java:408) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at deployment.myproject-1.0.war//io.confluent.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:829)
补充说明
该方法实际存在,可手动调用:
io.confluent.shaded.io.vertx.core.Context context = ...; io.confluent.ksql.util.VertxUtils.checkContext(context);
已创建测试项目,同时已在GitHub提交Issue,急需在近期解决该问题。
内容的提问来源于stack exchange,提问作者G33RY
相关产品推荐
相关产品推荐

