[ https://issues.apache.org/jira/browse/QPIDJMS-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17717546#comment-17717546 ]
Robbie Gemmell commented on QPIDJMS-587: ---------------------------------------- We have actually avoided the netty bom thus far as they have broken things with it multiple times. I would instead just add an entry for netty-transport-native-unix-common if needed. This also suggests you are not managing the versions in your application though. If you are mixing components with dependencies on clearly different versions of netty, as you note you are, then ideally you would manage the versions yourself to predictably pick one, otherwise there it is still going to be possible you will see issues even if each individual component managed every module they use. Unless they use exactly the same modules a mismatch is always possible, as one of the versions of any module has to be picked by the build tools, and thus so is a combination that doesnt work...perhaps in less obvious ways than seen here. > io.netty:netty-transport-native-unix-common not managed but used > ---------------------------------------------------------------- > > Key: QPIDJMS-587 > URL: https://issues.apache.org/jira/browse/QPIDJMS-587 > Project: Qpid JMS > Issue Type: Bug > Components: qpid-jms-client, qpid-jms-discovery > Affects Versions: 2.2.0 > Environment: linux OS running a Spring Boot app 2.7.11 and qpid-jms > 2.2.0 together. > Reporter: Harald Aamot > Priority: Major > Fix For: 2.3.0 > > > When using qpid-jms 2.2.0 running on a linux OS then netty transitively pulls > in io.netty:netty-transport-native-unix-common . > The version for this depndency is not managed in qpid-jms. > When running a SpringBoot 2.7.11 application, Spring Boot manages io.netty on > version 4.1.91.Final . This version then gets used for > io.netty:netty-transport-native-unix-common, while the other netty components > run on 4.1.86.Final (managed by qpid-jms). > This leads to a runtime exception when trying to connect. > Reason is this: > With netty 4.1.91.Final an incompatible change for qpid-jms has been made. > ChangelogĀ [https://netty.io/news/2023/04/03/4-1-91-Final.html] > incompatible changeĀ [https://github.com/netty/netty/issues/13317] > code changed thereĀ [https://github.com/netty/netty/pull/13318] > {noformat} > ["jakarta.jms.JMSException: Could not initialize class > io.netty.channel.unix.Errors"," > at > org.apache.qpid.jms.provider.ProviderException.toJMSException(ProviderException.java:34)"," > at > org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)"," > at > org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)"," > at > org.apache.qpid.jms.JmsConnection.onAsyncException(JmsConnection.java:1564)"," > at > org.apache.qpid.jms.JmsConnection.onProviderException(JmsConnection.java:1548)"," > at > org.apache.qpid.jms.JmsConnection.onConnectionFailure(JmsConnection.java:1392)"," > at > org.apache.qpid.jms.provider.failover.FailoverProvider.lambda$reportReconnectFailure$3(FailoverProvider.java:808)"," > at > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown > Source)"," > at java.base/java.util.concurrent.FutureTask.run(Unknown Source)"," > at > java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown > Source)"," > at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown > Source)"," > at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown > Source)"," > at java.base/java.lang.Thread.run(Unknown Source)","Caused by: > org.apache.qpid.jms.provider.exceptions.ProviderIOException: Could not > initialize class io.netty.channel.unix.Errors"," > at > org.apache.qpid.jms.provider.exceptions.ProviderExceptionSupport.createOrPassthroughFatal(ProviderExceptionSupport.java:46)"," > at > org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.java:309)"," > at > org.apache.qpid.jms.provider.failover.FailoverProvider$14.run(FailoverProvider.java:747)"," > ... 6 more","Caused by: java.io.IOException: Could not initialize class > io.netty.channel.unix.Errors"," > at > org.apache.qpid.jms.util.IOExceptionSupport.create(IOExceptionSupport.java:45)"," > at > org.apache.qpid.jms.transports.netty.NettyTcpTransport$2.operationComplete(NettyTcpTransport.java:176)"," > at > org.apache.qpid.jms.transports.netty.NettyTcpTransport$2.operationComplete(NettyTcpTransport.java:171)"," > at > io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)"," > at > io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)"," > at > io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)"," > at > io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)"," > at > io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)"," > at > io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)"," > at > io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.connect(AbstractEpollChannel.java:637)"," > at > io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1342)"," > at > io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:653)"," > at > io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:632)"," > at io.netty.handler.ssl.SslHandler.connect(SslHandler.java:714)"," > at > io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:657)"," > at > io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:632)"," > at > io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:616)"," > at > io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:978)"," > at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:265)"," > at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:250)"," > 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.epoll.EpollEventLoop.run(EpollEventLoop.java:406)"," > at > io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)"," > at > io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)"," > ... 1 more","Caused by: java.lang.NoClassDefFoundError: Could not > initialize class io.netty.channel.unix.Errors"," > at io.netty.channel.unix.Socket.connect(Socket.java:351)"," > at > io.netty.channel.epoll.AbstractEpollChannel.doConnect0(AbstractEpollChannel.java:773)"," > at > io.netty.channel.epoll.EpollSocketChannel.doConnect0(EpollSocketChannel.java:144)"," > at > io.netty.channel.epoll.AbstractEpollChannel.doConnect(AbstractEpollChannel.java:758)"," > at > io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.connect(AbstractEpollChannel.java:600)"," > ... 17 more"]} > {noformat} > [2023-04-24T11:18:33.655Z] > github.wdf.sap.corp/nextgenpayroll-montblanc/process-tracker-service/main: > 2023-04-24T11:18:18.885Z [APP/PROC/WEB/1] OUT \{"msg":"Connection > attempt:[15] to: > amqps://aba5da1c-7ba4-4a97-a7b8-bed634abc51d.messaging.eu10.mq.messagebroker.cloud.sap:7027 > > failed","level":"INFO","written_ts":"1682335098885062000","logger":"org.apache.qpid.jms.provider.failover.FailoverProvider","written_at":"2023-04-24T11:18:18.884Z","thread":"FailoverProvider: > async work thread","type":"log"} [2023-04-24T11:18:33.655Z] > github.wdf.sap.corp/nextgenpayroll-montblanc/process-tracker-service/main: > 2023-04-24T11:18:18.898Z [APP/PROC/WEB/1] OUT \{"msg":"Failed to connect > after: 15 > attempt(s)","level":"ERROR","written_ts":"1682335098898191000","logger":"org.apache.qpid.jms.provider.failover.FailoverProvider","written_at":"2023-04-24T11:18:18.897Z","thread":"FailoverProvider: > async work thread","type":"log"} [2023-04-24T11:18:33.655Z] > github.wdf.sap.corp/nextgenpayroll-montblanc/process-tracker-service/main: > 2023-04-24T11:18:18.898Z [APP/PROC/WEB/1] OUT \{"msg":"Connection > ID:4c280ae9-787d-4ef2-bf11-1f3f9682e709:1 has failed due to: Could not > initialize class > io.netty.channel.unix.Errors","level":"WARN","written_ts":"1682335098898573000","logger":"org.apache.qpid.jms.JmsConnection","written_at":"2023-04-24T11:18:18.898Z","thread":"FailoverProvider: > async work thread","type":"log"} > My proposal: > use the netty-bom to manage the dependencies in qpid-jms to never has > something similar occur again. I'll create a PR .. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org