java - Error implementing the Thrift API -
i'm implementing thrift remote procedure call framework in java. set thrift , generated skeleton code without lot of issues, i'm using api methods, strange errors.
here errors get:
exception in thread "main" org.apache.thrift.transport.ttransportexception: cannot write null outputstream @ org.apache.thrift.transport.tiostreamtransport.write(tiostreamtransport.java:142) @ org.apache.thrift.protocol.tbinaryprotocol.writei32(tbinaryprotocol.java:163) @ org.apache.thrift.protocol.tbinaryprotocol.writemessagebegin(tbinaryprotocol.java:91) @ simonsays$client.send_registerclient(simonsays.java:102) @ simonsays$client.registerclient(simonsays.java:96) @ simon.main(testclass.java:16)
i don't think i'm not making mistakes, make sure, here's code that's leading errors:
tprotocol prot = new tbinaryprotocol(new tsocket("http://thriftpuzzle.facebook.com",9030)); simonsays.client client = new simonsays.client(prot); client.registerclient("useremailaddress@gmail.com");
the error said generated client.registerclient()
call, call code generated thrift, makes me feel i'm doing wrong in setting connection itself.
the part making tprotocol
instance included myself, , it's that's problem lies.
i hoping have more of idea what's going wrong do.
please let me know if more information or clarification needed.
edit: found tprotocol
instantiation statement cassandra wiki
you need call open()
method on tsocket
instance in order connect , obtain input/output streams needs.
source: tsocket.java
Comments
Post a Comment