Skip to content
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

[Bug] Publish EventMeshMessage without requestCode throw java.lang.NullPointerException #4345

Closed
3 tasks done
mxsm opened this issue Aug 10, 2023 · 2 comments · Fixed by #4352
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@mxsm
Copy link
Member

mxsm commented Aug 10, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Windows

EventMesh version

master

What happened

when I use rust client to publish http EventMesh message without requestCode. And then will throw java.lang.NullPointerException
image

How to reproduce

EventMesh message without requestCode

Debug logs

2023-08-10 11:42:20,086 DEBUG [pool-4-thread-1] ConsumerManager(ConsumerManager.java:209) - grpc client info check
2023-08-10 11:42:20,086 DEBUG [pool-4-thread-1] ConsumerManager(ConsumerManager.java:218) - total number of ConsumerGroupClients: 0
2023-08-10 11:42:26,760 ERROR [eventMesh-http-worker-4] AbstractHTTPServer(AbstractHTTPServer.java:450) - AbstractHTTPServer.HTTPHandler.channelRead error
java.lang.NullPointerException: null
	at org.apache.eventmesh.runtime.boot.AbstractHTTPServer$HTTPHandler.channelRead(AbstractHTTPServer.java:417) [classes/:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-codec-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) [netty-codec-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) [netty-codec-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:174) [netty-common-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java) [netty-common-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:167) [netty-common-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) [netty-common-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) [netty-transport-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.79.Final.jar:4.1.79.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.79.Final.jar:4.1.79.Final]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
2023-08-10 11:42:30,073 DEBUG [pool-4-thread-1] ConsumerManager(ConsumerManager.java:209) - grpc client info check
2023-08-10 11:42:30,073 DEBUG [pool-4-thread-1] ConsumerManager(ConsumerManager.java:218) - total number of ConsumerGroupClients: 0

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@mxsm mxsm added the bug Something isn't working label Aug 10, 2023
mxsm added a commit to mxsm/incubator-eventmesh that referenced this issue Aug 12, 2023
@himansh295
Copy link
Contributor

@mxsm Can i work on this bug ?

@Pil0tXia
Copy link
Member

@himansh295 Hi, this issue is already linked with a PR.

xwm1992 pushed a commit that referenced this issue Aug 14, 2023
…ava.lang.NullPointerException (#4352)

* [ISSUE #4345]Fix publish EventMeshMessage without requestCode throw java.lang.NullPointerException

* optimize logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants