[ https://issues.apache.org/jira/browse/OLINGO-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephan Klevenz updated OLINGO-137: ----------------------------------- Component/s: odata2-jpa > 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 > > 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)