[ https://issues.apache.org/jira/browse/THRIFT-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249543#comment-13249543 ]
Hudson commented on THRIFT-1553: -------------------------------- Integrated in Thrift #430 (See [https://builds.apache.org/job/Thrift/430/]) THRIFT-1553 thrift nodejs service side can't read map structure, key as enum, value as Object Patch: Henrique Mendonca (Revision 1310986) Result = SUCCESS roger : http://svn.apache.org/viewvc/?view=rev&rev=1310986 Files : * /thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc * /thrift/trunk/test/nodejs/client.js > 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 > Assignee: Henrique Mendonca > 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