[ 
https://issues.apache.org/jira/browse/OOZIE-2181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shwetha G S updated OOZIE-2181:
-------------------------------
    Fix Version/s:     (was: trunk)
                   4.2

> JsonToBean has some missing and incorrect mappings
> --------------------------------------------------
>
>                 Key: OOZIE-2181
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2181
>             Project: Oozie
>          Issue Type: Bug
>          Components: client
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>             Fix For: 4.2
>
>         Attachments: OOZIE-2181.patch
>
>
> {{JsonToBean}} has code to map from Bundle Job, Coordinator Job, etc JSON 
> into the associated {{BundleJob}}, {{CoordinatorJob}}, etc classes.  
> If a mapping is missing, and you try to call a getter, the code will compile 
> but you'll get a {{RuntimeException}}.  For example; the mapping for 
> {{BundleJob.getAcl()}} is missing.  Specifically, when you use this code:
> {code:java}
> BundleJob job = client.getBundleJobInfo(jobId);
> String acl = job.getAcl();
> {code}
> you get this exception:
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: Undefined method 
> mapping: getAcl
>       at 
> org.apache.oozie.client.rest.JsonToBean$JsonInvocationHandler.invoke(JsonToBean.java:217)
>       at com.sun.proxy.$Proxy4.getAcl(Unknown Source)
>         ...
> {noformat}
> There are a few inconsistencies including extra mappings, missing mappings, 
> and missing information from the server.
> We should:
> # Fix these inconsistencies.
> # Write tests to prevent this sort of thing from happening in the future.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to