Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Thrift call gives "unknown result"

Tags:

thrift

I have a Thrift connection between a remote server & a web service.. thrift interface is compiled using 0.9.0 thrift compiler. When I make thrift calls to the remote server, it executes successfully in the remote, but in the client side - i see the following error:

org.apache.thrift.TApplicationException: PredictScoresNoPersist failed: unknown result

I checked the web, and checked all the solutions mentioned -- like mismatch in the thrift jars etc.. no luck yet. Please help.

Just a little background, this is a single-threaded REST client.

like image 282
dheeban Avatar asked Feb 27 '14 22:02

dheeban


1 Answers

The exception is clearly thrown at the client, thus the message response seems correctly transported:

public Map<String,Double> recv_PredictScoresNoPersist() throws org.apache.thrift.TException
    {
      PredictScoresNoPersist_result result = new PredictScoresNoPersist_result();
      receiveBase(result, "PredictScoresNoPersist");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "PredictScoresNoPersist failed: unknown result");
    }

The only two possible reasons I see are:

  • the server throws an (uncaught) exception
  • you try to return a null result, which is illegal with Thrift.
like image 122
JensG Avatar answered Jan 04 '23 11:01

JensG