[
https://issues.apache.org/jira/browse/OLINGO-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13950664#comment-13950664
]
Amit Jahagirdar commented on OLINGO-226:
----------------------------------------
Thanks Fabio for the prompt reply.
I am using the code from following link..Let me know if thats not the updated
one.
https://github.com/apache/incubator-olingo-odata4.
Also the exception that I am getting is as follows:
[main] DEBUG
com.msopentech.odatajclient.engine.communication.request.ODataRequest - HTTP
header being sent: Accept: application/json;odata=fullmetadata
[main] DEBUG
com.msopentech.odatajclient.engine.communication.request.ODataRequest - HTTP
header being sent: Content-Type: application/json;odata=fullmetadata
[main] DEBUG
com.msopentech.odatajclient.engine.communication.request.ODataRequest - HTTP
header being sent: DataServiceVersion: 3.0
[main] DEBUG
com.msopentech.odatajclient.engine.communication.request.ODataRequest - HTTP
header being sent: MaxDataServiceVersion: 3.0
[main] DEBUG
com.msopentech.odatajclient.engine.communication.request.ODataRequest - HTTP
header being sent: MinDataServiceVersion: 3.0
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at $Proxy9.getAll(Unknown Source)
at com.sample.SampleClient.main(SampleClient.java:29)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.msopentech.odatajclient.proxy.api.impl.AbstractInvocationHandler.invokeSelfMethod(AbstractInvocationHandler.java:88)
at
com.msopentech.odatajclient.proxy.api.impl.EntitySetInvocationHandler.invoke(EntitySetInvocationHandler.java:138)
... 2 more
Caused by:
com.msopentech.odatajclient.engine.communication.ODataServerErrorException:
HTTP/1.1 500 Internal Server Error
at
com.msopentech.odatajclient.engine.communication.request.ODataRequestImpl.doExecute(ODataRequestImpl.java:404)
at
com.msopentech.odatajclient.engine.communication.request.retrieve.ODataEntitySetRequest.execute(ODataEntitySetRequest.java:51)
at
com.msopentech.odatajclient.proxy.api.impl.EntitySetInvocationHandler.fetchPartialEntitySet(EntitySetInvocationHandler.java:281)
at
com.msopentech.odatajclient.proxy.api.impl.EntitySetInvocationHandler.fetchWholeEntitySet(EntitySetInvocationHandler.java:310)
at
com.msopentech.odatajclient.proxy.api.impl.EntitySetInvocationHandler.getAll(EntitySetInvocationHandler.java:335)
at
com.msopentech.odatajclient.proxy.api.impl.EntitySetInvocationHandler.getAll(EntitySetInvocationHandler.java:324)
... 8 more
> service.getProducts.getAll() not working for MyProject.
> -------------------------------------------------------
>
> Key: OLINGO-226
> URL: https://issues.apache.org/jira/browse/OLINGO-226
> Project: Olingo
> Issue Type: Question
> Components: odata4-client
> Reporter: Amit Jahagirdar
> Assignee: fabio martelli
> Priority: Critical
>
> Hi,
> I am using OdataJClient 0.10.0 plugin,OdataJClinet-engine,OdataJClient-proxy
> 10.0 from the incubator code for Odata V3.
> By making chnages to the pom.xml to point to my service url I am able to
> generate classes for my EDM.
> Then I wrote a sampleClient with following code and the code fails on the
> getAll() method.The EDMEntity set is similar to the default Northwind service
> provided by Odata,
> ===========================================================
> //XXX = my Ip address
> EntityContainerFactory entityContainerFactory =
> EntityContainerFactory.getV3Instance("XXXX/Northwind/1/Sample-NorthwindSourceModel/");
> NorthwindEntities service =
> entityContainerFactory.getEntityContainer(NorthwindEntities.class);
> com.mycompany.odata.sample.northwind.Products products =
> service.getProducts();
> ProductsCollection all = service.getProducts().getAll();
> ===========================================================Caused by:
> com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<'
> (code 60)): expected a valid value (number, String, array, object, 'true',
> 'false' or 'null')
> at [Source: org.apache.http.conn.EofSensorInputStream@1f315415; line: 1,
> column: 2]
> at
> com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1524)
> **********************************************************************************************
> It would be great if someone could help me on resolving this issue.
> Thanks
--
This message was sent by Atlassian JIRA
(v6.2#6252)