EOFError while calling a service with empty list/array as parameter
-------------------------------------------------------------------

                 Key: THRIFT-480
                 URL: https://issues.apache.org/jira/browse/THRIFT-480
             Project: Thrift
          Issue Type: Bug
          Components: Compiler (Ruby)
         Environment: MacOS X, 
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin9.6.0],

            Reporter: Andreas Riemer


Our service call expects a array/list of integers as parameter. The thrift 
service definition looks like:
list<StatisticData> statistic_of_cars(1: list<i32> ids) 

When we call this service with an empty list, we get an EOFError:
>> c.statistic_of_cars([])
EOFError: end of file reached
        from /opt/local/lib/ruby/1.8/net/protocol.rb:133:in `sysread'
        from /opt/local/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
        from /opt/local/lib/ruby/1.8/timeout.rb:62:in `timeout'
        from /opt/local/lib/ruby/1.8/timeout.rb:93:in `timeout'
        from /opt/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
        from /opt/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
        from /opt/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'
        from /opt/local/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
        from /opt/local/lib/ruby/1.8/net/http.rb:2009:in `read_new'
        from /opt/local/lib/ruby/1.8/net/http.rb:1050:in `request'
        from /opt/local/lib/ruby/1.8/net/http.rb:1037:in `request'
        from /opt/local/lib/ruby/1.8/net/http.rb:543:in `start'
        from /opt/local/lib/ruby/1.8/net/http.rb:1035:in `request'
        from /opt/local/lib/ruby/1.8/net/http.rb:845:in `post'
        from 
/opt/local/lib/ruby/gems/1.8/gems/thrift-0.0.2/lib/thrift/transport/http_client_transport.rb:40:in
 `flush'
        from 
/opt/local/lib/ruby/gems/1.8/gems/thrift-0.0.2/lib/thrift/client.rb:41:in 
`send_message'
        from 
/opt/local/lib/ruby/gems/1.8/gems/statistics_service-0.7.6/lib/statistics_service/gen-rb/StatisticsService.rb:37:in
 `send_statistic_of_cars'
        from 
/opt/local/lib/ruby/gems/1.8/gems/statistics_service-0.7.6/lib/statistics_service/gen-rb/StatisticsService.rb:32:in
 `statistic_of_cars'
        from 
/opt/local/lib/ruby/gems/1.8/gems/statistics_service-0.7.6/lib/statistics_service/client.rb:23:in
 `send'
        from 
/opt/local/lib/ruby/gems/1.8/gems/statistics_service-0.7.6/lib/statistics_service/client.rb:23:in
 `method_missing'

Every following service call cannot be executed and throws the same exception. 
The service fails even if we call it with a non empty array/list.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to