Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Olinge OData service: EdmSimpleTypeException

I am getting EdmSimpleTypeExceptions in some of my entities when i try to access them via OData. I am using Apache Olingo for doing that. The problem is that I can't implement any types other than integer and String. If I use a double I get the EdmSimpleTypeException, although double is an EdmSimpleType. I also tried all of the other types which are stated as an EdmSimpleType.

Is there any explanation why this happens? Any known bug in Olinge or someting like that?

like image 879
Tobias Kuess Avatar asked Nov 27 '25 04:11

Tobias Kuess


1 Answers

EdmSimpleTypeException is thrown in multiple cases, mostly for illegal type values which do not match with the entityType metadata.

Ex. In entityType a property is defined as non nullable and a null value is passed into it.

You can check documentation for EdmSimpleTypeExceptions here.

Here in your particular case what most likely is happening that you are setting EdmSimpleType as Double but the value you are trying to put against it is not one of the following types Double, Float, BigDecimal, Byte, Short, Integer, Long and Olingo is throwing an error while converting it.

You can check the complete list of mapping between the OData type and Java types here

like image 56
Shiva Avatar answered Nov 28 '25 20:11

Shiva



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!