You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2016/09/08 12:15:20 UTC
[jira] [Resolved] (OLINGO-957) Crash when trying to add data to
server
[ https://issues.apache.org/jira/browse/OLINGO-957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Amend resolved OLINGO-957.
------------------------------------
Resolution: Cannot Reproduce
Assignee: Christian Amend
Since there has been no answer I will close this issue. If it is still happening please reopen the issue.
> Crash when trying to add data to server
> ---------------------------------------
>
> Key: OLINGO-957
> URL: https://issues.apache.org/jira/browse/OLINGO-957
> Project: Olingo
> Issue Type: Question
> Components: odata4-client
> Affects Versions: (Java) V4 4.0.0-beta-03
> Reporter: Konstantin Kustov Sergeevich
> Assignee: Christian Amend
> Labels: android-studio, java
>
> Hello. When I try to add data to the service happens crash. I did everything I like this: https://github.com/apache/olingo-odata4/blob/master/fit/src/test/java/org/apache/olingo/fit/base/EntityCreateTestITCase.java I would be grateful if you help me.
> I used URL: http://services.odata.org/V4/OData/OData.svc/
> My code:
> ClientEntity entity = oDataClient.getObjectFactory().newEntity(new FullQualifiedName("ODataDemo.Category"));
> entity.getProperties().add(oDataClient.getObjectFactory().newPrimitiveProperty("ID", oDataClient.getObjectFactory().newPrimitiveValueBuilder().buildInt32(123)));
> entity.getProperties().add(oDataClient.getObjectFactory().newPrimitiveProperty("Name", oDataClient.getObjectFactory().newPrimitiveValueBuilder().buildString("TestName")));
> ODataEntityCreateRequest request = oDataClient.getCUDRequestFactory().getEntityCreateRequest( oDataClient.newURIBuilder(url).appendEntitySetSegment("Categories").build(), entity);
> request.setFormat(ODataFormat.APPLICATION_JSON);
> LogUtil.d(request.execute().getStatusCode());
> request.execute() causes a crash.
> Crash: org.apache.olingo.client.api.http.HttpClientException: org.apache.http.client.ClientProtocolException
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)