grpc: c++ server and java client

1,030 views
Skip to first unread message

gary

unread,
Aug 29, 2015, 9:40:30 PM8/29/15
to grpc.io

can grpc support "A Bidirectional streaming RPC" between c++ and java? it works fine when i test the example "SayHello",it is a sync method.
I used "grpc-java/examlpe/route-guide-client" as a client and "grpc-common/cpp/route_guide_server" as a server, port 50051, I got the error message:

com.google.common.util.concurrent.UncheckedExecutionException: io.grpc.StatusRuntimeException: UNIMPLEMENTED
at io.grpc.stub.Calls.getUnchecked(Calls.java:117)
at io.grpc.stub.Calls.blockingUnaryCall(Calls.java:129)
at io.grpc.examples.routeguide.RouteGuideGrpc$RouteGuideBlockingStub.getFeature(RouteGuideGrpc.java:204)
at io.grpc.examples.routeguide.RouteGuideClient.getFeature(RouteGuideClient.java:81)
at io.grpc.examples.routeguide.RouteGuideClient.main(RouteGuideClient.java:233)
Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED
at io.grpc.Status.asRuntimeException(Status.java:428)
at io.grpc.stub.Calls$UnaryStreamToFuture.onClose(Calls.java:324)
at io.grpc.ChannelImpl$CallImpl$ClientStreamListenerImpl$3.run(ChannelImpl.java:402)
at io.grpc.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:154)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Exception in thread "main" com.google.common.util.concurrent.UncheckedExecutionException: io.grpc.StatusRuntimeException: UNIMPLEMENTED
at io.grpc.stub.Calls.getUnchecked(Calls.java:117)
at io.grpc.stub.Calls.blockingUnaryCall(Calls.java:129)
at io.grpc.examples.routeguide.RouteGuideGrpc$RouteGuideBlockingStub.getFeature(RouteGuideGrpc.java:204)
at io.grpc.examples.routeguide.RouteGuideClient.getFeature(RouteGuideClient.java:81)
at io.grpc.examples.routeguide.RouteGuideClient.main(RouteGuideClient.java:233)
Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED
at io.grpc.Status.asRuntimeException(Status.java:428)
at io.grpc.stub.Calls$UnaryStreamToFuture.onClose(Calls.java:324)
at io.grpc.ChannelImpl$CallImpl$ClientStreamListenerImpl$3.run(ChannelImpl.java:402)
at io.grpc.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:154)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

can grpc work between c++ and java by using async method?
thanks

Eric Anderson

unread,
Aug 31, 2015, 2:07:15 PM8/31/15
to gary, grpc.io
Could a C++ dev look into this? I tried from the Java-side but the example isn't compiling on master ("too many arguments to CreateChannel").

sync vs async shouldn't matter at all; that is a language-specific detail and doesn't impact the wire-protocol.

The proto files look identical, so I'm surprised it doesn't work, especially since the hello world example worked. Maybe you were accidentally still running the hello world server?

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/55cfc62d-8102-46fa-9383-fa3a18502a21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simon Ma

unread,
Aug 31, 2015, 2:36:28 PM8/31/15
to Eric Anderson, gary, grpc.io
The proto packages are different.

Yang Gao

unread,
Aug 31, 2015, 2:41:45 PM8/31/15
to Simon Ma, Eric Anderson, gary, grpc.io
I somehow did not see this. This seems to be a duplicate of https://github.com/grpc/grpc/issues/3151. Please look at https://github.com/grpc/grpc/issues/3161 and it is being fixed.

Eric Anderson

unread,
Aug 31, 2015, 5:08:24 PM8/31/15
to Yang Gao, Simon Ma, gary, grpc.io
Arg. With the removal of grpc-common grpc-java now has two different routeguide.protos:

And of course they have different packages; the one I was looking at had the same package as the one in C++.

Yang Gao

unread,
Aug 31, 2015, 5:19:43 PM8/31/15
to Eric Anderson, Simon Ma, gary, grpc.io
As mentioned in the issue, we are all changing to routeguide as a package name.

gary

unread,
Aug 31, 2015, 11:26:15 PM8/31/15
to grpc.io, ej...@google.com, sim...@google.com, tjxia...@gmail.com
thank you

在 2015年9月1日星期二 UTC+8上午5:19:43,Yang Gao写道:
Reply all
Reply to author
Forward
0 new messages