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

Sharmadha Sainath commented on ATLAS-1939:
------------------------------------------

Attached a patch that would not throw NPE when JSON is not provided for request 
parameter . 

The following request with the patch now would succeed :
{code}
curl -v -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H 
"Cache-Control: no-cache" -F data=@t5.zip 
"http://localhost:21000/api/atlas/admin/import";
{code}

In the patch , added an empty JSON to request object if request is null or 
empty.

CC : [~ashutoshm] [~mad...@apache.org] [~ayubkhan]

> Export/Import Regression : NPE during import
> --------------------------------------------
>
>                 Key: ATLAS-1939
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1939
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>    Affects Versions: 0.9-incubating
>            Reporter: Sharmadha Sainath
>            Priority: Blocker
>         Attachments: ATLAS-1939.patch, Import_error_NPE2.txt, Import_NPE.txt
>
>
> Exported a hive_table and created zip file t5.zip and tried to import in into 
> another cluster using
> {code}
> curl -v -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H 
> "Cache-Control: no-cache" --data-binary @t5.zip 
> "http://host2:21000/api/atlas/admin/import";
> {code}
> Import Request failed with 500 internal server error with NPE in application 
> logs.
> Attached the exception stack trace.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to