[ https://issues.apache.org/jira/browse/OLINGO-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13910399#comment-13910399 ]
Anirban Roy commented on OLINGO-137: ------------------------------------ Hi David, Can you please send me your JPA classes and the extension class? Thanks and regards, Anirban > 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)