thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <br...@rapleaf.com>
Subject Re: Problem with Java -- Thrift "strict version old client?"
Date Tue, 17 Feb 2009 15:39:43 GMT
The problem is that you used the framed transport on the client side  
but not on the server side.

On Feb 17, 2009, at 1:39 AM, tim wee wrote:

> Hello thrift-users,
> Just wondering if anyone has gotten this error before. Both client and
> server are in java...
>
> Feb 17, 2009 1:14:32 AM
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess run
>
>      [java] SEVERE: Thrift error occurred during processing of  
> message.
>
>      [java] org.apache.thrift.protocol.TProtocolException: Missing  
> version
> in readMessageBegin, old client?
>
>      [java] at  
> org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(
> TBinaryProtocol.java:189)
>
>      [java] at bag_banner.gen.Environment$Processor.process(
> Environment.java:205)
>
>      [java] at org.apache.thrift.server.TThreadPoolServer 
> $WorkerProcess.run(
> TThreadPoolServer.java:240)
>
>      [java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:650)
>
>      [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:675)
>
>      [java] at java.lang.Thread.run(Thread.java:613)
>
> client side code:
>
> TSocket sock = new TSocket(new Socket(host, envPort));
>
> TFramedTransport transport = new TFramedTransport(sock);
>
> TBinaryProtocol protocol = new TBinaryProtocol(transport, true, true);
>
>
>
> serverside:
>
> TServerSocket serverTransport = new TServerSocket(port);
>
> Environment.Processor processor = new Environment.Processor(env);
>
> Factory protFactory = new TBinaryProtocol.Factory(true, true);
>
> TThreadPoolServer server = new TThreadPoolServer(processor,  
> serverTransport,
>
> protFactory);
>
>  System.out.println("starting simulator server");
>
> server.serve();
>
>
>
> I took a look at the source code, and it seems like the booleans being
> passed into TBinaryProtocol.Factory (serverside) and TBinaryProtocol
> (clientside) just have to match.
>
>
> I tried false with both as well, (to not check versions) it went  
> through,
> but then it didn't get to my server-side code, which implemented  
> the Iface
> of the generated class. I put debugging/printout statements inside the
> generated class, and it seems like it doesn't return or do anything  
> after
> the process method of the Processor, specifically after calling
> this. iprot.readMessageBegin();
>
>
> Any help or insight on what I should try next is appreciated. Thanks!
>
>
> Tim


Mime
View raw message