You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
java.lang.NullPointerException: data
at java.base/java.util.Objects.requireNonNull(Objects.java:259)
at reactor.core.publisher.FluxHandle$HandleSubscriber.next(FluxHandle.java:251)
at io.modelcontextprotocol.spec.McpClientSession.lambda$sendRequest$12(McpClientSession.java:280)
at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:113)
at reactor.core.publisher.SerializedSubscriber.onNext(SerializedSubscriber.java:99)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.onNext(FluxTimeout.java:181)
at reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:176)
java.lang.IllegalStateException: Failed to unmarshal response: JSONRPCResponse[jsonrpc=2.0, id=4937ec33-1, result=null, error=null]
at io.modelcontextprotocol.spec.McpClientSession.lambda$sendRequest$12(McpClientSession.java:293)
So it look like there appear to be some cases when that jsonRpcResponse is not itself null, but has neither a result nor an error, which I guess is surprising? Perhaps that should be caught earlier?
So it look like there appear to be some cases when that jsonRpcResponse is not itself null, but has neither a result nor an error, which I guess is surprising? Perhaps that should be caught earlier?
enola-dev/enola#1904 works around this in my project ("downstream"). But it would probably be good if this library wouldn't just throw a confusing internal NPE, but would catch this problem more clearly and earlier. I'll see if I contribute to that.
It would probably be good if this library wouldn't just throw a confusing internal NPE, but would catch this problem more clearly and earlier. I'll see if I contribute to that.
Activity
vorburger commentedon Nov 8, 2025
FTR: I'm still seeing this NPE after upgrading from
0.14.1to0.15.0. I'll try to debug it using #607. @tzolovdeps: Use MCP lib from vorburger fork (to test un-merged changes; re. e…
deps: Use MCP lib from vorburger fork (to test un-merged changes; re. e…
vorburger commentedon Nov 8, 2025
Running my enola-dev/enola#1862 with #607 I get:
So it look like there appear to be some cases when that
jsonRpcResponseis not itself null, but has neither aresultnor anerror, which I guess is surprising? Perhaps that should be caught earlier?deps: Use MCP lib from vorburger fork (to test un-merged changes; re. e…
vorburger commentedon Nov 8, 2025
In my case, this happened because I used my own custom Jackson ObjectMapper.
enola-dev/enola#1904 works around this in my project ("downstream"). But it would probably be good if this library wouldn't just throw a confusing internal NPE, but would catch this problem more clearly and earlier. I'll see if I contribute to that.
fix: Validate JSONRPCResponse in constructor (fixes modelcontextproto…
vorburger commentedon Nov 9, 2025
#658 proposed for this.