thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mars Hsu (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-1553) thrift nodejs service side can't read map structure, key as enum, value as Object
Date Fri, 06 Apr 2012 06:38:30 GMT

    [ https://issues.apache.org/jira/browse/THRIFT-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248129#comment-13248129
] 

Mars Hsu commented on THRIFT-1553:
----------------------------------

hi Mendonca,
I try your patch, but all map data change to null.
They really have data in client side, but all null in server side.
                
> thrift nodejs service side can't read map structure, key as enum, value as Object
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-1553
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1553
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Compiler
>    Affects Versions: 0.8
>            Reporter: Mars Hsu
>            Priority: Blocker
>              Labels: javascript, nodejs
>             Fix For: 0.9
>
>         Attachments: THRIFT-1553-restore-nodejs-maps.patch
>
>
> Thrift JS client cannot read map of structures
> https://issues.apache.org/jira/browse/THRIFT-1238
> I think this issus still not fixed. Here is a example
> enum AutoAttribute {
>   POWER = 0,
>   MANIPULATE = 1,
>   APPEARANCE = 2,
>   DURABILITY = 3,
> }
> struct UserAutoDTO {
>   1: required string autoId,
>   2: required string autoName,
>   3: required string color,
>   4: required map<AutoAttribute, double> currentAttribute,
> }
> the client is scala(java), and service side is nodejs.
> [2012-04-05 08:02:41.547] [INFO] console - input.rstack:
> [2012-04-05 08:02:41.548] [INFO] console - undefined
> [2012-04-05 08:02:41.549] [INFO] console - input.rpos:
> [2012-04-05 08:02:41.549] [INFO] console - undefined
> /web/node_modules/thrift/lib/thrift/server.js:50
>           throw e;
>                 ^
> TypeError: Cannot read property 'length' of undefined
>     at Object.read (/web/gen-nodejs/auto_types.js:1670:29)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message