[jira] [Updated] (OLINGO-1093) Binary Content in Batch Requests/Responses
[ https://issues.apache.org/jira/browse/OLINGO-1093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramya updated OLINGO-1093: -- Attachment: (was: 85f41b37.diff) > Binary Content in Batch Requests/Responses > -- > > Key: OLINGO-1093 > URL: https://issues.apache.org/jira/browse/OLINGO-1093 > Project: Olingo > Issue Type: Bug >Affects Versions: V2 2.0.8 >Reporter: Ramya > Attachments: BatchBinary.diff > > > Currently it is not possible to set plain binary content in batch requests > and payloads as the setter only allows for strings. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (OLINGO-1093) Binary Content in Batch Requests/Responses
[ https://issues.apache.org/jira/browse/OLINGO-1093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramya updated OLINGO-1093: -- Attachment: BatchBinary.diff > Binary Content in Batch Requests/Responses > -- > > Key: OLINGO-1093 > URL: https://issues.apache.org/jira/browse/OLINGO-1093 > Project: Olingo > Issue Type: Bug >Affects Versions: V2 2.0.8 >Reporter: Ramya > Attachments: BatchBinary.diff > > > Currently it is not possible to set plain binary content in batch requests > and payloads as the setter only allows for strings. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (OLINGO-1098) Incorrect handling of SQL wildcards '_' and '%' on filtering
[ https://issues.apache.org/jira/browse/OLINGO-1098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ramya updated OLINGO-1098: -- Attachment: JPASQLQueryFix.diff > Incorrect handling of SQL wildcards '_' and '%' on filtering > > > Key: OLINGO-1098 > URL: https://issues.apache.org/jira/browse/OLINGO-1098 > Project: Olingo > Issue Type: Bug > Components: odata2-jpa >Affects Versions: V2 2.0.8 >Reporter: Ramya > Attachments: JPASQLQueryFix.diff > > > When an OData filter contains the SQL wildcards '%' and '_', these are > incorrectly translated into database queries which contain these characters > unescaped, leading to incorrect search results. > Suggestion is to create positional parameterized queries. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OLINGO-1107) UriDecoder should use java.net.URLDecoder
[ https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15966119#comment-15966119 ] Ramesh Reddy commented on OLINGO-1107: -- I believe this has been debated before, although it would be nice to have relaxed support for "+" but %20 representation is correct form according to [1]. Olingo is known to be very strict in parsing rules [2], which IMO could use little more relaxation in terms of client issued urls. So, this is not a bug, but by design. [1] http://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20 [2] http://markmail.org/search/?q=list%3Aorg.apache.olingo.user+space#query:list%3Aorg.apache.olingo.user%20space+page:1+mid:ukiihmxuyqvunxat+state:results > UriDecoder should use java.net.URLDecoder > - > > Key: OLINGO-1107 > URL: https://issues.apache.org/jira/browse/OLINGO-1107 > Project: Olingo > Issue Type: Bug > Components: odata4-server >Affects Versions: (Java) V4 4.3.0 >Reporter: Jon McEwen > > Query filters are incorrectly parsed, because the > org.apache.olingo.commons.core.Decoder doesn't convert '+' to space. > Simple fix is to use java.net.URLDecoder instead (line 85): > {{return URLDecoder.decode(encoded, "UTF-8");}} > Additional unit test: > {code:Java} > @Test > public void decodePlusAsSpace() throws Exception{ > checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", > "PaymentStatus eq 'Cleared'"); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (OLINGO-1109) JPA silently dropping navigation properties if not found
Patrick Haller created OLINGO-1109: -- Summary: JPA silently dropping navigation properties if not found Key: OLINGO-1109 URL: https://issues.apache.org/jira/browse/OLINGO-1109 Project: Olingo Issue Type: Improvement Components: odata2-jpa Affects Versions: V2 2.0.8 Reporter: Patrick Haller We encountered an issue when creating a ProjectCost record, directly to be associated with its parent Project by setting a navigation property. The information encoded in { '__metadata': { uri: 'xyz' } } was correctly parsed in the Olingo stack, but in {{JPALink.create() #174}}, the {{targetJPAEntity}} could not be resolved as the value 'xyz' was indeed wrong. The created data in persistence was missing the link to the parent entity, but the error went unnoticed as no exception was thrown. I would suggest that {{JPALink.create}} should also {{throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.RESOURCE_X_NOT_FOUND}} like {{JPALink.delete}}. It seems that {{JPALink.modifyLink}} is also intentionally ignoring if the target entity cannot be found. Not sure what behavior the OData specification documents here, but data loss should not go unnoticed, I think. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (OLINGO-1108) Edm.Decimal not supported in OData Create requests (POST)
Patrick Haller created OLINGO-1108: -- Summary: Edm.Decimal not supported in OData Create requests (POST) Key: OLINGO-1108 URL: https://issues.apache.org/jira/browse/OLINGO-1108 Project: Olingo Issue Type: Bug Components: odata2-core Affects Versions: V2 2.0.8 Reporter: Patrick Haller We've got Edm.Decimal on a POST request (OData Create). Upon sending the request, we see the following exception in the server log. In JsonPropertyConsumer.readSimpleProperty()'s switch case, we have type=Edm.Decimal tokenType=JsonToken.NUMBER and therefore end up with throwing INVALID_PROPERTY_VALUE. *exception* {quote}Caused by: org.apache.olingo.odata2.api.ep.EntityProviderException: Provided value for the property 'Quantity' is not compatible with the property. at org.apache.olingo.odata2.core.ep.consumer.JsonPropertyConsumer.readSimpleProperty(JsonPropertyConsumer.java:227) at org.apache.olingo.odata2.core.ep.consumer.JsonPropertyConsumer.readPropertyValue(JsonPropertyConsumer.java:169) at org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.handleName(JsonEntryConsumer.java:172) at org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.readEntryContent(JsonEntryConsumer.java:130) at org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.readSingleEntry(JsonEntryConsumer.java:93) at org.apache.olingo.odata2.core.ep.consumer.JsonEntityConsumer.readEntry(JsonEntityConsumer.java:57) at org.apache.olingo.odata2.core.ep.JsonEntityProvider.readEntry(JsonEntityProvider.java:315) at org.apache.olingo.odata2.core.ep.ProviderFacadeImpl.readEntry(ProviderFacadeImpl.java:179) at org.apache.olingo.odata2.api.ep.EntityProvider.readEntry(EntityProvider.java:746) at org.apache.olingo.odata2.jpa.processor.core.ODataEntityParser.parseEntry(ODataEntityParser.java:64) ... 66 common frames omitted{quote} *Data Model classes* *Java Client (Spring RestTemplate)* {quote}class MyPostRequest { @JsonProperty("Cost") BigDecimal cost; }{quote} *Java Server (Olingo)* {quote}class ProjectCost implements Serializable { // ... @Column private BigDecimal cost; }{quote} *$metadata* {quote}http://schemas.microsoft.com/ado/2007/06/edmx; Version="1.0"> http://schemas.microsoft.com/ado/2007/08/dataservices/metadata; m:DataServiceVersion="1.0"> http://schemas.microsoft.com/ado/2008/09/edm; Namespace="project"> http://www.sap.com/Protocols/SAPData; Name="Project" sap:label="Project"> http://www.sap.com/Protocols/SAPData; Name="LastUpdate" Type="Edm.DateTime" Nullable="true" sap:label="Last Update"/> http://www.sap.com/Protocols/SAPData; Name="Name" Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Project"/> http://www.sap.com/Protocols/SAPData; Name="ProjectType" Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Type"/> http://www.sap.com/Protocols/SAPData; Name="Responsible" Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Person Responsible"/> http://www.sap.com/Protocols/SAPData; Name="Stage" Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Stage"/> http://www.sap.com/Protocols/SAPData; Name="Status" Type="Edm.String" Nullable="true" MaxLength="255" sap:label="Status"/> {quote} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (OLINGO-1104) NavigationLink missing from JSON with expand and metadata=full
[ https://issues.apache.org/jira/browse/OLINGO-1104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15966055#comment-15966055 ] Ramesh Reddy commented on OLINGO-1104: -- This should have been covered under [1], debug and see why this is not being hit by your code. [1] https://github.com/apache/olingo-odata4/blob/master/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataJsonSerializer.java#L546 > NavigationLink missing from JSON with expand and metadata=full > -- > > Key: OLINGO-1104 > URL: https://issues.apache.org/jira/browse/OLINGO-1104 > Project: Olingo > Issue Type: Bug > Components: odata4-server >Affects Versions: (Java) V4 4.3.0 >Reporter: Jon McEwen > > When a client request is like > {{http://server/service/Entities?$expand=Children}} > with header > {{Accept: application/json;odata.metadata=full}} > then the response should include in each Entity a navigationLink > corresponding to the Children, as described here: > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata03/os/odata-json-format-v4.0-errata03-os-complete.html#_Toc453766637 > e.g. > {{"Items@odata.navigationLink" : > "http://server/service/Entities(123)/Children"}} > Suggested fix: > https://github.com/apache/olingo-odata4/pull/17 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (OLINGO-1104) NavigationLink missing from JSON with expand and metadata=full
[ https://issues.apache.org/jira/browse/OLINGO-1104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jon McEwen updated OLINGO-1104: --- Component/s: odata4-server > NavigationLink missing from JSON with expand and metadata=full > -- > > Key: OLINGO-1104 > URL: https://issues.apache.org/jira/browse/OLINGO-1104 > Project: Olingo > Issue Type: Bug > Components: odata4-server >Affects Versions: (Java) V4 4.3.0 >Reporter: Jon McEwen > > When a client request is like > {{http://server/service/Entities?$expand=Children}} > with header > {{Accept: application/json;odata.metadata=full}} > then the response should include in each Entity a navigationLink > corresponding to the Children, as described here: > http://docs.oasis-open.org/odata/odata-json-format/v4.0/errata03/os/odata-json-format-v4.0-errata03-os-complete.html#_Toc453766637 > e.g. > {{"Items@odata.navigationLink" : > "http://server/service/Entities(123)/Children"}} > Suggested fix: > https://github.com/apache/olingo-odata4/pull/17 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (OLINGO-1107) UriDecoder should use java.net.URLDecoder
[ https://issues.apache.org/jira/browse/OLINGO-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jon McEwen updated OLINGO-1107: --- Description: Query filters are incorrectly parsed, because the org.apache.olingo.commons.core.Decoder doesn't convert '+' to space. Simple fix is to use java.net.URLDecoder instead (line 85): {{return URLDecoder.decode(encoded, "UTF-8");}} Additional unit test: {code:Java} @Test public void decodePlusAsSpace() throws Exception{ checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", "PaymentStatus eq 'Cleared'"); } {code} was: Query filters are incorrectly parsed, because the org.apache.olingo.commons.core.Decoder doesn't convert '+' to space. Simple fix is to use java.net.URLDecoder instead (line 85): {{return URLDecoder.decode(encoded, "UTF-8");}} Additional unit test: {{ @Test public void decodePlusAsSpace() throws Exception{ checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", "PaymentStatus eq 'Cleared'"); } }} > UriDecoder should use java.net.URLDecoder > - > > Key: OLINGO-1107 > URL: https://issues.apache.org/jira/browse/OLINGO-1107 > Project: Olingo > Issue Type: Bug > Components: odata4-server >Affects Versions: (Java) V4 4.3.0 >Reporter: Jon McEwen > > Query filters are incorrectly parsed, because the > org.apache.olingo.commons.core.Decoder doesn't convert '+' to space. > Simple fix is to use java.net.URLDecoder instead (line 85): > {{return URLDecoder.decode(encoded, "UTF-8");}} > Additional unit test: > {code:Java} > @Test > public void decodePlusAsSpace() throws Exception{ > checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", > "PaymentStatus eq 'Cleared'"); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (OLINGO-1107) UriDecoder should use java.net.URLDecoder
Jon McEwen created OLINGO-1107: -- Summary: UriDecoder should use java.net.URLDecoder Key: OLINGO-1107 URL: https://issues.apache.org/jira/browse/OLINGO-1107 Project: Olingo Issue Type: Bug Components: odata4-server Affects Versions: (Java) V4 4.3.0 Reporter: Jon McEwen Query filters are incorrectly parsed, because the org.apache.olingo.commons.core.Decoder doesn't convert '+' to space. Simple fix is to use java.net.URLDecoder instead (line 85): {{return URLDecoder.decode(encoded, "UTF-8");}} Additional unit test: {{ @Test public void decodePlusAsSpace() throws Exception{ checkOption("%24filter=PaymentStatus+eq+%27Cleared%27", "$filter", "PaymentStatus eq 'Cleared'"); } }} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Resolved] (OLINGO-1106) Custom Query options in batch request
[ https://issues.apache.org/jira/browse/OLINGO-1106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Amend resolved OLINGO-1106. - Resolution: Fixed Fix Version/s: (Java) V4 4.4.0 Resolved with commit: https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=commit;h=af116170a2fe89dbaef3f859e65d596f79206c4e > Custom Query options in batch request > - > > Key: OLINGO-1106 > URL: https://issues.apache.org/jira/browse/OLINGO-1106 > Project: Olingo > Issue Type: Test > Components: odata4-server >Reporter: Archana Rai >Assignee: Christian Amend >Priority: Minor > Fix For: (Java) V4 4.4.0 > > Attachments: 1357b28a.diff > > > To ensure nothing breaks with the ABNF adaption/change for custom query with > $batch, we have added tests. > OData V4.0 Errata 03 already explicitly allows custom query options without > restricting this to certain request types. See > > http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.html#_Toc453752212: > > As per the ABNF for OData V4.01 : all requests now allow custom query > options. See: > https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/4.01%20spec/ABNF/odata-abnf-construction-rules.txt?rev=1023=0=0 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Resolved] (OLINGO-1105) Custom Query options in batch request
[ https://issues.apache.org/jira/browse/OLINGO-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Amend resolved OLINGO-1105. - Resolution: Fixed Fix Version/s: V2 2.0.9 Resolved with: https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=ff4ab99569e322e0315b414e2b078d7548a7c0fb > Custom Query options in batch request > - > > Key: OLINGO-1105 > URL: https://issues.apache.org/jira/browse/OLINGO-1105 > Project: Olingo > Issue Type: Test > Components: odata2-core >Reporter: Archana Rai >Assignee: Christian Amend >Priority: Minor > Fix For: V2 2.0.9 > > Attachments: batchTests.diff > > > As per the oasis for custom query options: > http://www.odata.org/documentation/odata-version-2-0/uri-conventions/ > In order to verify that $batch requests can take custom query options we have > added the tests. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Assigned] (OLINGO-1106) Custom Query options in batch request
[ https://issues.apache.org/jira/browse/OLINGO-1106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Amend reassigned OLINGO-1106: --- Assignee: Christian Amend > Custom Query options in batch request > - > > Key: OLINGO-1106 > URL: https://issues.apache.org/jira/browse/OLINGO-1106 > Project: Olingo > Issue Type: Test > Components: odata4-server >Reporter: Archana Rai >Assignee: Christian Amend >Priority: Minor > Attachments: 1357b28a.diff > > > To ensure nothing breaks with the ABNF adaption/change for custom query with > $batch, we have added tests. > OData V4.0 Errata 03 already explicitly allows custom query options without > restricting this to certain request types. See > > http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.html#_Toc453752212: > > As per the ABNF for OData V4.01 : all requests now allow custom query > options. See: > https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/4.01%20spec/ABNF/odata-abnf-construction-rules.txt?rev=1023=0=0 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Assigned] (OLINGO-1105) Custom Query options in batch request
[ https://issues.apache.org/jira/browse/OLINGO-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Amend reassigned OLINGO-1105: --- Assignee: Christian Amend > Custom Query options in batch request > - > > Key: OLINGO-1105 > URL: https://issues.apache.org/jira/browse/OLINGO-1105 > Project: Olingo > Issue Type: Test > Components: odata2-core >Reporter: Archana Rai >Assignee: Christian Amend >Priority: Minor > Attachments: batchTests.diff > > > As per the oasis for custom query options: > http://www.odata.org/documentation/odata-version-2-0/uri-conventions/ > In order to verify that $batch requests can take custom query options we have > added the tests. -- This message was sent by Atlassian JIRA (v6.3.15#6346)