thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Fergason <>
Subject Re: Using the cocoa source generator.
Date Tue, 20 Apr 2010 01:27:13 GMT
That did the trick.  Thanks!

From: Fred Potter <>
Sent: Mon, April 19, 2010 11:26:46 AM
Subject: Re: Using the cocoa source generator.

Ahh, okay.

You might also want to check the strictRead / strictWrite settings.
On Cocoa, both of these values are by default OFF, while on Java it
appears that strictRead is OFF while strictWrite is ON.

On Cocoa, try...

TBinaryProtocol *protocol = [[[TBinaryProtocol alloc]
initWithTransport: transport strictRead: YES strictWrite: YES]

And then do the equivalent on the Java side in your call to

I remember hitting this bump myself, so hopefully this is your issue.


On Mon, Apr 19, 2010 at 11:18 AM, Jeremy Fergason
<> wrote:
> Fred, it may be the Java however, I've been able to poke at the server successfully with
python ... that's why I suspected the Obj-C.
> -Jeremy
> ________________________________
> From: Fred Potter <>
> To:
> Sent: Mon, April 19, 2010 10:18:18 AM
> Subject: Re: Using the cocoa source generator.
> Hi Jeremy,
> It sounds like it _could_ be an issue w/ the Java side.  Are the log4j
> libraries there?  The slf4j-api-1.5.8.jar and slf4j-simple-1.5.8.jar
> files are working for me.
> You might want to try testing the Java server in isolation.  If you
> generate the python output for your .thrift file, you'll also get a
> shell script which you can use to poke at a running thrift service.
> That should help you troubleshoot.
> Fred
> On Mon, Apr 19, 2010 at 8:25 AM, Jeremy Fergason
> <> wrote:
>> All,
>> I've been trying to get a simple demo going using the Objective-C/Cocoa code generation.
 I've been able to get it to work with both Java and Python; and I think that I'm fairly close
with Objective-C.  I went ahead and turned the Objective-C stuff into a framework (I'd be
happy to commit this back when everything is working) ... this was relatively straightforward,
just required changing the imports on the generated code to be:
>> #import <Thrift/...>
>> I also had some issues including the CFNetwork/CFSocket... headers.  I think this
is because you want to include that on the iPhone but not MacOSX, for MacOSX I think you should
just include the CoreServices stuff.  I also added the delegate for the NSInputStream and
>> Everything is compiling and running now; however, I can't actually get the service
to work.  I have a java server running on port 7911 and it appears to be getting something
because everytime I try to communicate via objective-c I get an error about Log4j appenders
not being configured properly.  In objective-c I get an error about the pipe being broken.
>> I've posted my code online:
>> Thrift Framework:
>> Thrift Demo code:
>> Thanks for any insights in advance!
>> -Jeremy Fergason

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message