You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2023/05/25 09:26:00 UTC

[jira] [Comment Edited] (IGNITE-19552) ArrayStoreException on connect to remote server node

    [ https://issues.apache.org/jira/browse/IGNITE-19552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726125#comment-17726125 ] 

Konstantin Orlov edited comment on IGNITE-19552 at 5/25/23 9:25 AM:
--------------------------------------------------------------------

The problem is caused by dependency conflict.

Both {{ignite-jdbc}} and {{ignite-client-handler}} modules have (transitive in case of jdbc) dependency on {{ignite-client-common}} module. The {{ClientMessageDecoder}} class from exception in description resides in the {{ignite-client-common}} and extends {{{}io.netty.handler.codec.LengthFieldBasedFrameDecoder{}}}. The jdbc is published as fatJar shadowing and relocating all its external dependencies ({{{}io.netty{}}} is among them).

Having both {{ignite-jdbc}} and ignite-runner (including all transitive deps) in the project result in having two version of {{{}ClientMessageDecoder{}}}: the first one extends {{io.netty.handler.codec.LengthFieldBasedFrameDecoder}} and another extends {{{}{*}org.apache.ignite.shaded{*}.io.netty.handler.codec.LengthFieldBasedFrameDecoder{}}}.


was (Author: korlov):
The problem is caused by dependency conflict.

Both {{ignite-jdbc}} and {{ignite-client-handler}} modules have (transitive in case of jdbc) dependency on {{ignite-client-common}} module. The {{ClientMessageDecoder}} class from exception in description resides in the {{ignite-client-common}} and extends {{io.netty.handler.codec.LengthFieldBasedFrameDecoder}}. The jdbc is published as fatJar shadowing and relocating all its external dependencies ({{io.netty}} is among them).

Having both {{ignite-jdbc}} and ignite-runner (with transitive all deps) in the project result in having two version of {{ClientMessageDecoder}}: the first one extends {{io.netty.handler.codec.LengthFieldBasedFrameDecoder}} and another extends {{*org.apache.ignite.shaded*.io.netty.handler.codec.LengthFieldBasedFrameDecoder}}.

> ArrayStoreException on connect to remote server node
> ----------------------------------------------------
>
>                 Key: IGNITE-19552
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19552
>             Project: Ignite
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 3.0
>            Reporter: Alexander Belyak
>            Priority: Major
>              Labels: ignite-3
>
> The problem consistently reproduces with the remote server node, sometimes - with the local one on AI3 after {color:#d1d2d3}a4912c63 IGNITE-19318 Unable to build stand alone/fat jar with JDBC driver (#2048){color}.
> 1) Start single server node
> 2) Active cluster
> 3) Connect to the cluster via JDBC driver.
> Expected result: connection established
> Actual result:
> {code:java}
> [16:08:46][INFO ][Thread-2] Create table request: CREATE TABLE IF NOT EXISTS usertable (yscb_key VARCHAR PRIMARY KEY, field0 VARCHAR, field1 VARCHAR, field2 VARCHAR, field3 VARCHAR, field4 VARCHAR, field5 VARCHAR, field6 VARCHAR, field7 VARCHAR, field8 VARCHAR, field9 VARCHAR);May 23, 2023 4:08:46 PM io.netty.channel.ChannelInitializer exceptionCaughtWARNING: Failed to initialize a channel. Closing: [id: 0x0392f8b4, L:/127.0.0.1:10800 - R:/127.0.0.1:53528]java.lang.ArrayStoreException: org.apache.ignite.internal.client.proto.ClientMessageDecoder    at org.apache.ignite.client.handler.ClientHandlerModule$1.initChannel(ClientHandlerModule.java:250)    at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)    at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)    at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1114)    at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)    at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)    at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)    at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)    at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)    at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)    at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)    at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)    at java.base/java.lang.Thread.run(Thread.java:829) {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)