You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eventmesh.apache.org by "9997766 (via GitHub)" <gi...@apache.org> on 2024/03/24 11:18:16 UTC

[I] 关于类型转换问题 (eventmesh)

9997766 opened a new issue, #4801:
URL: https://github.com/apache/eventmesh/issues/4801

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### 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]  如何处理
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [I] [Question] 关于类型转换问题 (eventmesh)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4801:
URL: https://github.com/apache/eventmesh/issues/4801#issuecomment-2271907047

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [I] [Question] 关于类型转换问题 (eventmesh)

Posted by "yinglalanice (via GitHub)" <gi...@apache.org>.
yinglalanice commented on issue #4801:
URL: https://github.com/apache/eventmesh/issues/4801#issuecomment-2099979245

   这个问题我也遇到了,使用源码启动的方式没有问题,但是不管是使用二进制还是Docker的启动方式都有问题。
   
   分析了一下原因可能是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加载进来,但是还没有想好这个类加载器放在哪更优雅一些


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [I] 关于类型转换问题 (eventmesh)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4801:
URL: https://github.com/apache/eventmesh/issues/4801#issuecomment-2016775668

   Welcome to the Apache EventMesh community!!
   We are glad that you are contributing by opening this issue. :D
   
   Please make sure to include all the relevant context.
   We will be here shortly.
   
   If you are interested in contributing to our project, please let us know!
   You can check out our contributing guide on [contributing to EventMesh](https://eventmesh.apache.org/community/contribute/contribute).
   
   Want to get closer to the community?
   
   |WeChat Assistant|WeChat Public Account|Slack|
   |-|-|-|
   |<img src="https://github.com/apache/eventmesh/blob/master/resources/wechat-assistant.jpg?raw=true" width="128"/>|<img src="https://github.com/apache/eventmesh/blob/master/resources/wechat-official.jpg?raw=true" width="128"/>|[Join Slack Chat](https://join.slack.com/t/the-asf/shared_invite/zt-1y375qcox-UW1898e4kZE_pqrNsrBM2g)|
   
   Mailing Lists:
   | Name | Description |Subscribe	|Unsubscribe|Archive
   | ----    | ----    |----    | ----    | ----    |
   |Users	|User support and questions mailing list|	[Subscribe](mailto:users-subscribe@eventmesh.incubator.apache.org)	|[Unsubscribe](mailto:users-unsubscribe@eventmesh.incubator.apache.org)	|[Mail Archives](https://lists.apache.org/list.html?users@eventmesh.apache.org)|
   |Development	|Development related discussions|	[Subscribe](mailto:dev-subscribe@eventmesh.incubator.apache.org)	|[Unsubscribe](mailto:dev-unsubscribe@eventmesh.incubator.apache.org)	|[Mail Archives](https://lists.apache.org/list.html?dev@eventmesh.apache.org)|
   |Commits	|All commits to repositories|	[Subscribe](mailto:commits-subscribe@eventmesh.incubator.apache.org)	|[Unsubscribe](mailto:commits-unsubscribe@eventmesh.incubator.apache.org)	|[Mail Archives](https://lists.apache.org/list.html?commits@eventmesh.apache.org)|
   |Issues	|Issues or PRs comments and reviews|	[Subscribe](mailto:commits-subscribe@eventmesh.incubator.apache.org)	|[Unsubscribe](mailto:commits-unsubscribe@eventmesh.incubator.apache.org)	|[Mail Archives](https://lists.apache.org/list.html?commits@eventmesh.apache.org)|


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [I] 关于类型转换问题 (eventmesh)

Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on issue #4801:
URL: https://github.com/apache/eventmesh/issues/4801#issuecomment-2047192639

   >应该把plugin下的rocket-storage的包,拷贝到apps下能解决问题
   
   I think this is not a good way to solve this issue, since the jar files under `/apps` are all APIs like `eventmesh-storage-api-1.10.0-release.jar` and shouldn't have a specific implementation.
   
   Will you reproduce this issue with source code? It seems the exception was throwed at `org.apache.eventmesh.storage.rocketmq.patch.EventMeshMessageListenerConcurrently` Line 44.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [I] 关于类型转换问题 (eventmesh)

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 commented on issue #4801:
URL: https://github.com/apache/eventmesh/issues/4801#issuecomment-2016777560

   Okay, we will test this issue again and will provide feedback later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


Re: [I] 关于类型转换问题 (eventmesh)

Posted by "qqeasonchen (via GitHub)" <gi...@apache.org>.
qqeasonchen commented on issue #4801:
URL: https://github.com/apache/eventmesh/issues/4801#issuecomment-2017094981

   @9997766 It would be better to write in English so many others can read.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org