karishma-tirthani / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

0.5-snapshot: Exception when retrieving entities from a Netflix entitySetInfo "collectionType cannot be null" #70

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use 0.5-SNAPSHOT of odata4j
2. Run org.odata4j.examples.consumer.ServiceListingConsumerExample but only 
with the Netflix ODataService
3. Exception is received

What is the expected output? What do you see instead?
Expected to print out of entities from the different entity sets of the netflix 
service.

Instead, an exception was thrown.

Exception may be a side effect of the fixes for issue 57.

What version of the product are you using? On what operating system?
I'm currently working on consuming SAP Gateway services on the android 
platform. Somewhat similar to the odata4j android app, but with focus on 
tablets (fragments) and with extensibility possibilities.

Thank you so much for the fix on issue 57. Because of this I wanted to update 
odata4j client bundle to the latest version.

However, once I upgrade to the 0.5-SNAPSHOT (and did the necessary changes due 
to the new EntitySetInfo), the two primary test services I use, netflix and 
stackoverflow, stopped working. These services were working with the 0.4 client 
bundle.

Please provide any additional information below.
Stack trace
Exception in thread "main" java.lang.IllegalArgumentException: collectionType 
cannot be null
    at org.odata4j.edm.EdmCollectionType.<init>(EdmCollectionType.java:12)
    at org.odata4j.format.xml.EdmxFormatParser.resolve(EdmxFormatParser.java:205)
    at org.odata4j.format.xml.EdmxFormatParser.parseMetadata(EdmxFormatParser.java:73)
    at org.odata4j.consumer.ODataClient.getMetadata(ODataClient.java:70)
    at org.odata4j.consumer.ODataConsumer$CachedEdmDataServices.refreshDelegate(ODataConsumer.java:474)
    at org.odata4j.consumer.ODataConsumer$CachedEdmDataServices.getDelegate(ODataConsumer.java:468)
    at org.odata4j.internal.EdmDataServicesDecorator.findEdmEntitySet(EdmDataServicesDecorator.java:44)
    at org.odata4j.consumer.ODataConsumer$CachedEdmDataServices.findEdmEntitySet(ODataConsumer.java:480)
    at org.odata4j.consumer.ODataConsumer.getFeedCustomizationMapping(ODataConsumer.java:441)
    at org.odata4j.consumer.ODataConsumer.getEntities(ODataConsumer.java:258)
    at org.odata4j.consumer.ODataConsumer.getEntities(ODataConsumer.java:245)
    at org.odata4j.examples.consumer.ServiceListingConsumerExample.printOutFirstEntities(ServiceListingConsumerExample.java:90)
    at org.odata4j.examples.consumer.ServiceListingConsumerExample.main(ServiceListingConsumerExample.java:64)

Original issue reported on code.google.com by dagfinn.parnas on 24 Sep 2011 at 9:26

GoogleCodeExporter commented 8 years ago
Good catch - this was a recent regression introduced during some type-system 
refactoring we're doing as part of 0.5.

Should be fixed as of ra24edd723aab.  I updated the clientbundle in the android 
project.

Original comment by john.spurlock on 25 Sep 2011 at 7:11