You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "David Radenkov (JIRA)" <ji...@apache.org> on 2014/02/25 09:19:21 UTC

[jira] [Closed] (OLINGO-137) FunctionImport returns null

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

David Radenkov closed OLINGO-137.
---------------------------------

    Resolution: Fixed

> FunctionImport returns null 
> ----------------------------
>
>                 Key: OLINGO-137
>                 URL: https://issues.apache.org/jira/browse/OLINGO-137
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 1.0.0
>            Reporter: David Radenkov
>            Assignee: Anirban Roy
>             Fix For: V2 1.2.0
>
>
> I have JPA-Entity "User" and I try to return it with FunctionImport:
> @FunctionImport(name = "myFunc",entitySet = "User", returnType = ReturnType.ENTITY_TYPE , multiplicity = Multiplicity.ONE, httpMethod = @HttpMethod(name = Name.GET))
>   public User currentUser(){
>          User currentUser = getLoggedInUser();
>               return currentUser;
>   }
> But the response  from that function is:
> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
> <code/>
> <message xml:lang="en">
> An exception of type 'NullPointerException' occurred.
> </message>
> </error>
> I have tried to chage the ReturnType and Multiplicity but the response was same. 
> For example If I re-factor the function to return Integer and set the Return Type to SCALAR it works fine.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)