NutzCN Logo
问答 怎么让rocketmq client用自己的 netty包,项目是netty框架,现在要整合rocketmq,包冲突了,大哭,有红包!
发布于 2407天前 作者 qq_b1a959c1 4609 次浏览 复制 上一个帖子 下一个帖子
标签:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.rocketmq.client.producer.DefaultMQProducer]: Factory method 'getRocketMQProducer' threw exception; nested exception is java.lang.NoSuchMethodError: io.netty.channel.nio.NioEventLoopGroup.<init>(ILjava/util/concurrent/ThreadFactory;)V
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
	... 44 common frames omitted
Caused by: java.lang.NoSuchMethodError: io.netty.channel.nio.NioEventLoopGroup.<init>(ILjava/util/concurrent/ThreadFactory;)V
	at com.alibaba.rocketmq.remoting.netty.NettyRemotingClient.<init>(NettyRemotingClient.java:254)
	at com.alibaba.rocketmq.client.impl.MQClientAPIImpl.<init>(MQClientAPIImpl.java:94)
	at com.alibaba.rocketmq.client.impl.factory.MQClientInstance.<init>(MQClientInstance.java:133)
	at com.alibaba.rocketmq.client.impl.MQClientManager.getAndCreateMQClientInstance(MQClientManager.java:51)
	at com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl.start(DefaultMQProducerImpl.java:175)
	at com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl.start(DefaultMQProducerImpl.java:160)
	at com.alibaba.rocketmq.client.producer.DefaultMQProducer.start(DefaultMQProducer.java:76)
	at com.sinochem.yunlian.truck.coordinate.jt809.common.config.RocketMQProducerConfiguration.getRocketMQProducer(RocketMQProducerConfiguration.java:49)
	at com.sinochem.yunlian.truck.coordinate.jt809.common.config.RocketMQProducerConfiguration$$EnhancerBySpringCGLIB$$5a1c0e43.CGLIB$getRocketMQProducer$0(<generated>)
	at com.sinochem.yunlian.truck.coordinate.jt809.common.config.RocketMQProducerConfiguration$$EnhancerBySpringCGLIB$$5a1c0e43$$FastClassBySpringCGLIB$$b7dcd137.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
	at com.sinochem.yunlian.truck.coordinate.jt809.common.config.RocketMQProducerConfiguration$$EnhancerBySpringCGLIB$$5a1c0e43.getRocketMQProducer(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
	... 45 common frames omitted

2 回复

分别是什么版本的netty

@wendal 谢谢wendal回复,刚刚把rocketmq-client的版本升级到3.6.2.Final,问题好像解决了,大笑....

添加回复
请先登陆
回到顶部