Closed GoogleCodeExporter closed 9 years ago
here is more trace that may be useful in debugging the problem
Caused by: java.lang.RuntimeException: Could not derive the entity-set for
entry:
https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/CityCrime(115856)
at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:328)
at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:155)
at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:143)
at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:41)
at org.odata4j.jersey.consumer.ConsumerQueryEntitiesRequest$EntryIterator.advance(ConsumerQueryEntitiesRequest.java:81)
at org.core4j.ReadOnlyIterator.hasNext(ReadOnlyIterator.java:48)
Original comment by svirdhag...@gmail.com
on 25 Mar 2012 at 1:08
Original comment by john.spurlock
on 25 Mar 2012 at 8:21
Working fine for me with 0.6.
String url = "https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes";
OClientBehavior basicAuth = OClientBehaviors.basicAuth("accountKey", accountKey);
ODataConsumer c = ODataJerseyConsumer.newBuilder(url).setClientBehaviors(basicAuth).build();
System.out.println( c.getEntities("CityCrime").execute().take(100).toList());
Original comment by john.spurlock
on 25 Mar 2012 at 9:22
- I ran into the same issue with 0.6 when using the class ODataJerseyConsumer.
I called the create ODataJerseyConsumer.create(url) method then,
getEntities("/SampleCustomerData").execute().toList(); and I get the same error
reported.
- It worked when I used version 0.5, but using the ODataConsumer class instead,
and didn't have to prefix the "SampleCustomerData" with the the '/'.
- It is also too slow to be used in a real application (at least on Android
2.3.3), both 0.5 or 0.6. I wonder if there are plans to address the performance
issue.
Original comment by ned.nas...@gmail.com
on 10 Jun 2012 at 9:43
Ned, is your comment about Microsoft azure data market? Please open a
different bug if you are running into issues unrelated to data market. I just
retested data market access (data.gov) and it seems to be fine.
Original comment by john.spurlock
on 17 Jun 2012 at 7:44
The argument passing and the way of establishing consumers seems to have
changed between earlier versions (0.3) and the current version. Before, one
could supply any part of the URL that is ultimately generated to create the
consumer and then provide the rest of the URL in the query spec provided to get
entities. But, now, one needs to be careful based on which database one is
trying to get data from in the Azure data market place. Not sure why this
change was made as it reduces flexibility and uniform wrapping schemes cannot
be applied. But, it does work for me with the new example in the example
directory of the source distribution.
Original comment by svirdhag...@gmail.com
on 17 Jun 2012 at 8:03
Ok sounds good. Feel free to suggest new consumer api enhancements to ease
data market access as a separate issue - where you can provide more detail.
Or better yet, send a patch! : )
Original comment by john.spurlock
on 17 Jun 2012 at 8:07
thanks. Will start a new issue. You would not want me to patch !!
Original comment by svirdhag...@gmail.com
on 17 Jun 2012 at 9:18
Original issue reported on code.google.com by
svirdhag...@gmail.com
on 25 Mar 2012 at 1:02