You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "Malaka Mahanama (JIRA)" <ji...@apache.org> on 2014/05/11 00:05:41 UTC

[jira] [Commented] (USERGRID-18) null pointer response when adding entity to collection by name

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

Malaka Mahanama commented on USERGRID-18:
-----------------------------------------

Hi [~aweeraman], 

I was looking into https://issues.apache.org/jira/browse/USERGRID-94 and noticed that :
*Class:* org.apache.usergrid.persistence.Identifier.java
*Method:*  public static Identifier from( Object obj ) 
returns *null* if the type is not matched to a known type. This could cause a lot of problems as methods are performed on these null objects later on (saw a few loops doing this).

This might be the cause for this bug. Just a hunch. 
Hope this will save you some time ! 

Thanks and Regards, 
Malaka

> null pointer response when adding entity to collection by name
> --------------------------------------------------------------
>
>                 Key: USERGRID-18
>                 URL: https://issues.apache.org/jira/browse/USERGRID-18
>             Project: Usergrid
>          Issue Type: Bug
>          Components: Stack
>            Reporter: Rod Simpson
>            Assignee: Anuradha Weeraman
>             Fix For: 1.1
>
>
> "This is an error handling issue that could be improved. When trying to add an entity to another collection mistakenly by name, a NPE is given. It would be helpful if the exception explained that uuid is needed instead of giving NPE. New users looking at the API could get confused by this. 
> Request path: https://api.usergrid.com/uyourorgname/test/zemptycollections/testentity13658241603/zemptycollection13656406513s/testentity13658241614 
> { 
> ""error"": ""null_pointer"", 
> ""timestamp"": 1365824162338, 
> ""duration"": 0, 
> ""exception"": ""java.lang.NullPointerException"" 
> }"



--
This message was sent by Atlassian JIRA
(v6.2#6252)