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
{{ message }}
This repository has been archived by the owner on Mar 24, 2018. It is now read-only.
We are using for our protobuf service layer a java server and the ruby app we're running is the client. When doing a request from the ruby client, calling the java RPC service, the java service returns bad request data. We also get a bad stack trace on the ruby side, saying invalid value: nil
Doing some grep-ing it is happening in this file: lib/protobuf/message/field.rb on 691
My ruby env is Ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
We're using rprotoc 0.4.0, which we know is the experimental branch.
Unfortunately rprotoc 0.3.3 doesn't work with ruby 1.9.1 (having TCPSocket readbyte issues - invalid number of params)
rpc_client = Protobuf::Rpc::Client.new('localhost', 7575)
rpc_client.call(:authorize , rpc_request , rpc_response) # throws the error of "TypeError - Invalid value: nil"
Java protobuf is reporting:
com.googlecode.protobuf.socketrpc.SocketRpcServer$Handler handleError
WARNING: BAD_REQUEST_DATA: Bad request data from client
com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.
at com.google.protobuf.InvalidProtocolBufferException.truncatedMessage(InvalidProtocolBufferException.java:49)
at com.google.protobuf.CodedInputStream.refillBuffer(CodedInputStream.java:691)
at com.google.protobuf.CodedInputStream.readRawBytes(CodedInputStream.java:756)
at com.google.protobuf.CodedInputStream.readBytes(CodedInputStream.java:274)
at com.google.protobuf.UnknownFieldSet$Builder.mergeFieldFrom(UnknownFieldSet.java:484)
at com.google.protobuf.GeneratedMessage$Builder.parseUnknownField(GeneratedMessage.java:271)
at com.googlecode.protobuf.socketrpc.SocketRpcProtos$Request$Builder.mergeFrom(SocketRpcProtos.java:371)
at com.googlecode.protobuf.socketrpc.SocketRpcProtos$Request$Builder.mergeFrom(SocketRpcProtos.java:1)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:244)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:182)
at com.google.protobuf.AbstractMessageLite$Builder.mergeFrom(AbstractMessageLite.java:202)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:683)
at com.googlecode.protobuf.socketrpc.SocketRpcServer$Handler.callMethod(SocketRpcServer.java:160)
at com.googlecode.protobuf.socketrpc.SocketRpcServer$Handler.run(SocketRpcServer.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We are using for our protobuf service layer a java server and the ruby app we're running is the client. When doing a request from the ruby client, calling the java RPC service, the java service returns bad request data. We also get a bad stack trace on the ruby side, saying invalid value: nil
Doing some grep-ing it is happening in this file:
lib/protobuf/message/field.rb
on 691My ruby env is Ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
We're using rprotoc 0.4.0, which we know is the experimental branch.
Unfortunately rprotoc 0.3.3 doesn't work with ruby 1.9.1 (having TCPSocket readbyte issues - invalid number of params)
Sample Ruby code:
rpc_request = Cerebro::UserAuthorizationParams.new
rpc_request.email = params[:email]
rpc_request.hash = Digest::SHA1.hexdigest(params[:password])
rpc_response = Cerebro::User.new
Java protobuf is reporting:
com.googlecode.protobuf.socketrpc.SocketRpcServer$Handler handleError
WARNING: BAD_REQUEST_DATA: Bad request data from client
com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.
at com.google.protobuf.InvalidProtocolBufferException.truncatedMessage(InvalidProtocolBufferException.java:49)
at com.google.protobuf.CodedInputStream.refillBuffer(CodedInputStream.java:691)
at com.google.protobuf.CodedInputStream.readRawBytes(CodedInputStream.java:756)
at com.google.protobuf.CodedInputStream.readBytes(CodedInputStream.java:274)
at com.google.protobuf.UnknownFieldSet$Builder.mergeFieldFrom(UnknownFieldSet.java:484)
at com.google.protobuf.GeneratedMessage$Builder.parseUnknownField(GeneratedMessage.java:271)
at com.googlecode.protobuf.socketrpc.SocketRpcProtos$Request$Builder.mergeFrom(SocketRpcProtos.java:371)
at com.googlecode.protobuf.socketrpc.SocketRpcProtos$Request$Builder.mergeFrom(SocketRpcProtos.java:1)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:244)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:182)
at com.google.protobuf.AbstractMessageLite$Builder.mergeFrom(AbstractMessageLite.java:202)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:683)
at com.googlecode.protobuf.socketrpc.SocketRpcServer$Handler.callMethod(SocketRpcServer.java:160)
at com.googlecode.protobuf.socketrpc.SocketRpcServer$Handler.run(SocketRpcServer.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
The text was updated successfully, but these errors were encountered: