You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by "Birenheide, Richard" <ri...@sap.com> on 2015/10/07 12:06:39 UTC
Entity not accepted as return type in JPA EDM model
Hi,
I am following the instructions given here:
https://olingo.apache.org/doc/odata2/tutorials/jpafunctionimport.html
However, unlike with complex types I am not able to get entities to work as return type. Using the classes attached gives me the following error when calling the metadata document:
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en">
"OData - JPA Model Processor: Return type not found. Class: [class com.sap.suite.arch.gf.odata.v2.UserSearchProcessor], Method: [findUsers], Type: [User]"
</message>
</error>
This doesn’t work on collections of entities, either. In contrast to complex types, I did not add anything in extendJPAEdmSchema(JPAEdmSchemView), as outlined in the example. Browsing your source repositories I did not find anything needed to add, as well.
Kind Regards
Richard
Dr. Richard Birenheide
Development Architect
Suite Architecture
SAP SE
Dietmar-Hopp-Allee 16,
69190 Walldorf
Germany
T +49 / 6227 / 7-42303
F +49 / 6227 / 7835816
E richard.birenheide@sap.com
http://www.sap.com<http://www.sap.com/>
Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.
RE: Entity not accepted as return type in JPA EDM model
Posted by "Birenheide, Richard" <ri...@sap.com>.
Hi,
I traced the problem down to:
Other entities are working. I then renamed the class from “com.sap.suite.arch.gf.odata.jpa.User” to “com.sap.suite.arch.gf.odata.jpa.GlobalUser”, it works. In the classpath, there are a bunch of other “User” classes in different packages (one of them is a JPA entity as well), maybe that is related to the error.
Kind Regards
Richard
From: Birenheide, Richard [mailto:richard.birenheide@sap.com]
Sent: Mittwoch, 7. Oktober 2015 12:07
To: user@olingo.apache.org
Subject: Entity not accepted as return type in JPA EDM model
Hi,
I am following the instructions given here:
https://olingo.apache.org/doc/odata2/tutorials/jpafunctionimport.html
However, unlike with complex types I am not able to get entities to work as return type. Using the classes attached gives me the following error when calling the metadata document:
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en">
"OData - JPA Model Processor: Return type not found. Class: [class com.sap.suite.arch.gf.odata.v2.UserSearchProcessor], Method: [findUsers], Type: [User]"
</message>
</error>
This doesn’t work on collections of entities, either. In contrast to complex types, I did not add anything in extendJPAEdmSchema(JPAEdmSchemView), as outlined in the example. Browsing your source repositories I did not find anything needed to add, as well.
Kind Regards
Richard
Dr. Richard Birenheide
Development Architect
Suite Architecture
SAP SE
Dietmar-Hopp-Allee 16,
69190 Walldorf
Germany
T +49 / 6227 / 7-42303
F +49 / 6227 / 7835816
E richard.birenheide@sap.com
http://www.sap.com<http://www.sap.com/>
Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.