Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
Description
Thrift file: ( client to java Server )
service myService {
oneway void info ( 1:i32 server_id )
}
When I make a request with info, on the java server I get this error:
22:16:12.553 [pool-3-thread-5] ERROR o.a.thrift.server.TThreadPoolServer - Error occurred during processing of message.
java.lang.NullPointerException: null
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:34) ~[libthrift-0.9.0-snapshot.jar:0.9.0-snapshot]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) ~[libthrift-0.9.0-snapshot.jar:0.9.0-snapshot]
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176) ~[libthrift-0.9.0-snapshot.jar:0.9.0-snapshot]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_01]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_01]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_01]
On line 34 of ProcessFunction we have: result.write(oprot); but result is null, becouse when the func is oneway, getResult's response is always null
TBase result = getResult(iface, args);
oprot.writeMessageBegin(new TMessage(getMethodName(), TMessageType.REPLY, seqid));
result.write(oprot);
getResult funcion is:
public info_result getResult(I iface, info_args args) throws org.apache.thrift.TException
instead without oneway it is:
public info_result getResult(I iface, info_args args) throws org.apache.thrift.TException
Attachments
Issue Links
- duplicates
-
THRIFT-1447 NullpointerException in ProcessFunction.class :in "oneway" method
- Closed