You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Henrique Mendonca (Updated) (JIRA)" <ji...@apache.org> on 2012/04/05 18:32:25 UTC
[jira] [Updated] (THRIFT-1553) thrift nodejs service side can't
read map structure, key as enum, value as Object
[ https://issues.apache.org/jira/browse/THRIFT-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henrique Mendonca updated THRIFT-1553:
--------------------------------------
Attachment: THRIFT-1553-restore-nodejs-maps.patch
yeah, my fault, the patch THRIFT-1553-restore-nodejs-maps.patch restores the former code for node maps
> 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