-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] 关于类型转换问题 #4801
Comments
Welcome to the Apache EventMesh community!! Please make sure to include all the relevant context. If you are interested in contributing to our project, please let us know! Want to get closer to the community?
Mailing Lists:
|
Okay, we will test this issue again and will provide feedback later. |
@9997766 It would be better to write in English so many others can read. |
I think this is not a good way to solve this issue, since the jar files under Will you reproduce this issue with source code? It seems the exception was throwed at |
@Pil0tXia 分析了一下原因可能是org.apache.rocketmq.client.impl.consumer.ConsumeMessageConcurrentlyService 这个类在两个包中都存在:eventmesh-storage-rocketmq-1.10.0-release.jar和rocketmq-client-4.9.5.jar。在本地源码启动时可能类加载的是eventmesh-storage-rocketmq-1.10.0-release.jar所以没有问题,二进制部署时类加载rocketmq-client-4.9.5.jar,导致创建的类型就是ConsumeConcurrentlyContext而不是EventMeshConsumeConcurrentlyContext。 解决方案就是自定义一个类加载器,先吧eventmesh-storage-rocketmq-1.10.0-release.jar包中的ConsumeMessageConcurrentlyService加载进来,但是还没有想好这个类加载器放在哪更优雅一些 |
It has been 90 days since the last activity on this issue. Apache EventMesh values the voices of the community. Please don't hesitate to share your latest insights on this matter at any time, as the community is more than willing to engage in discussions regarding the development and optimization directions of this feature. If you feel that your issue has been resolved, please feel free to close it. Should you have any additional information to share, you are welcome to reopen this issue. |
Search before asking
Question
我用docker运行eventmesh 服务端,用rocketmq作为存储,用sdk中的http作为subsciber消费消息时,eventmesh.out的日志报如下错误,我猜测是因为不同的类加载器,导致的EventMeshConsumeConcurrentlyContext 和ConsumeConcurrentlyContext 不认,应该把plugin下的rocket-storage的包,拷贝到apps下能解决问题,
是否能重新打镜像包,放到库上?
tenerConcurrently.java:63) - handleMessage fail
java.lang.ClassCastException: org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext cannot be cast to org.apache.eventmesh.storage.rocketmq.patch.EventMeshConsumeConcurrentlyContext
at org.apache.eventmesh.storage.rocketmq.patch.EventMeshMessageListenerConcurrently.consumeMessage(EventMeshMessageListenerConcurrently.java:44) [eventmesh-storage-rocketmq-1.10.0-release.jar:1.10.0-release]
at org.apache.rocketmq.client.impl.consumer.ConsumeMessageConcurrentlyService$ConsumeRequest.run(ConsumeMessageConcurrentlyService.java:402) [rocketmq-client-4.9.5.jar:4.9.5]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181] 如何处理
The text was updated successfully, but these errors were encountered: