3

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?

Tobias Kuess
  • 739
  • 2
  • 14
  • 33
  • I know OData not familiar with Olingo, maybe you can try the Olingo mailing list http://olingo.apache.org/support.html to get the answers for your questions. – QianLi Oct 27 '14 at 03:01

1 Answers1

2

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

Draken
  • 3,134
  • 13
  • 34
  • 54
Shiva
  • 6,677
  • 4
  • 36
  • 61