[
https://issues.apache.org/jira/browse/OLINGO-926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tobias Stolzenberger updated OLINGO-926:
----------------------------------------
Description:
Hi,
I'm using Olingo version 2.0.6 with JPA adapter. I'm sending a batch message to
the server that causes an Exception with text: Invalid URI: line '6'
The reason for that is that parsing of the HTTP status line seems not to be
able to handle absolute path values.
This is the request line I'm sending:
{code:borderStyle=solid}
GET /com.sap.icmobile.demo.application/odata/referenceservice/RootEntity1s
HTTP/1.1
{code}
If I use the relative URI instead the batch message get processed without an
error:
{code:borderStyle=solid}
GET /com.sap.icmobile.demo.application/odata/referenceservice/RootEntity1s
HTTP/1.1
{code}
This is the complete HTTP request body that I send:
{code:borderStyle=solid}
POST /mypath/odata/referenceservice/$batch HTTP/1.1
Content-Type: multipart/mixed;
boundary=batch_f90a925d-f990-4b20-bbc3-057f6eb1c692
X-CSRF-Token: ...
...
--batch_f90a925d-f990-4b20-bbc3-057f6eb1c692
Content-Disposition: form-data; name="1"; filename="1"
Content-Type: application/http
Content-Transfer-Encoding: binary
GET /mypath/odata/referenceservice/RootEntity1s HTTP/1.1
Host: myhost
Accept: application/atom+xml;type=feed
--batch_f90a925d-f990-4b20-bbc3-057f6eb1c692--
{code}
And this is the Exception stacktrace:
{code:borderStyle=solid}
Invalid URI: line '6'. - org.apache.olingo.odata2.api.batch.BatchException:
Invalid URI: line '6'.
at
org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.parseUri(BatchTransformatorCommon.java:216)
at
org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.parse(BatchTransformatorCommon.java:165)
at
org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.<init>(BatchTransformatorCommon.java:156)
at
org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.createRequest(BatchRequestTransformator.java:85)
at
org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.processQueryOperation(BatchRequestTransformator.java:78)
at
org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.transform(BatchRequestTransformator.java:52)
at
org.apache.olingo.odata2.core.batch.v2.BatchParser.parseBatch(BatchParser.java:86)
at
org.apache.olingo.odata2.core.batch.v2.BatchParser.parse(BatchParser.java:64)
at
org.apache.olingo.odata2.core.batch.v2.BatchParser.parseBatchRequest(BatchParser.java:58)
at
org.apache.olingo.odata2.core.ep.ProviderFacadeImpl.parseBatchRequest(ProviderFacadeImpl.java:237)
at
org.apache.olingo.odata2.api.ep.EntityProvider.parseBatchRequest(EntityProvider.java:887)
{code}
was:
Hi,
I'm using Olingo version 2.0.6 with JPA adapter. I'm sending a batch message to
the server that causes an Exception with text: Invalid URI: line '6'
The reason for that is that parsing of the HTTP status line seems not to be
able to handle absolute path values.
This is the request line I'm sending:
GET /com.sap.icmobile.demo.application/odata/referenceservice/RootEntity1s
HTTP/1.1
If I use the relative URI instead the batch message get processed without an
error:
GET /com.sap.icmobile.demo.application/odata/referenceservice/RootEntity1s
HTTP/1.1
This is the complete HTTP request body that I send:
{code:borderStyle=solid}
POST /mypath/odata/referenceservice/$batch HTTP/1.1
Content-Type: multipart/mixed;
boundary=batch_f90a925d-f990-4b20-bbc3-057f6eb1c692
X-CSRF-Token: ...
...
--batch_f90a925d-f990-4b20-bbc3-057f6eb1c692
Content-Disposition: form-data; name="1"; filename="1"
Content-Type: application/http
Content-Transfer-Encoding: binary
GET /mypath/odata/referenceservice/RootEntity1s HTTP/1.1
Host: myhost
Accept: application/atom+xml;type=feed
--batch_f90a925d-f990-4b20-bbc3-057f6eb1c692--
{code}
And this is the Exception stacktrace:
2016 04 01
14:53:29#+00#ERROR#org.apache.olingo.odata2.api.processor.ODataErrorCallback##[email protected]#http-bio-8041-exec-8#na#industrymobility1#hep#web#industrymobility2#Message
= Invalid URI: line '6'. - org.apache.olingo.odata2.api.batch.BatchException:
Invalid URI: line '6'.
at
org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.parseUri(BatchTransformatorCommon.java:216)
at
org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.parse(BatchTransformatorCommon.java:165)
at
org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.<init>(BatchTransformatorCommon.java:156)
at
org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.createRequest(BatchRequestTransformator.java:85)
at
org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.processQueryOperation(BatchRequestTransformator.java:78)
at
org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.transform(BatchRequestTransformator.java:52)
at
org.apache.olingo.odata2.core.batch.v2.BatchParser.parseBatch(BatchParser.java:86)
at
org.apache.olingo.odata2.core.batch.v2.BatchParser.parse(BatchParser.java:64)
at
org.apache.olingo.odata2.core.batch.v2.BatchParser.parseBatchRequest(BatchParser.java:58)
at
org.apache.olingo.odata2.core.ep.ProviderFacadeImpl.parseBatchRequest(ProviderFacadeImpl.java:237)
at
org.apache.olingo.odata2.api.ep.EntityProvider.parseBatchRequest(EntityProvider.java:887)
> Batch Request fails if request line is absolute
> -----------------------------------------------
>
> Key: OLINGO-926
> URL: https://issues.apache.org/jira/browse/OLINGO-926
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.6
> Reporter: Tobias Stolzenberger
>
> Hi,
> I'm using Olingo version 2.0.6 with JPA adapter. I'm sending a batch message
> to the server that causes an Exception with text: Invalid URI: line '6'
> The reason for that is that parsing of the HTTP status line seems not to be
> able to handle absolute path values.
> This is the request line I'm sending:
> {code:borderStyle=solid}
> GET /com.sap.icmobile.demo.application/odata/referenceservice/RootEntity1s
> HTTP/1.1
> {code}
> If I use the relative URI instead the batch message get processed without an
> error:
> {code:borderStyle=solid}
> GET /com.sap.icmobile.demo.application/odata/referenceservice/RootEntity1s
> HTTP/1.1
> {code}
> This is the complete HTTP request body that I send:
> {code:borderStyle=solid}
> POST /mypath/odata/referenceservice/$batch HTTP/1.1
> Content-Type: multipart/mixed;
> boundary=batch_f90a925d-f990-4b20-bbc3-057f6eb1c692
> X-CSRF-Token: ...
> ...
> --batch_f90a925d-f990-4b20-bbc3-057f6eb1c692
> Content-Disposition: form-data; name="1"; filename="1"
> Content-Type: application/http
> Content-Transfer-Encoding: binary
> GET /mypath/odata/referenceservice/RootEntity1s HTTP/1.1
> Host: myhost
> Accept: application/atom+xml;type=feed
> --batch_f90a925d-f990-4b20-bbc3-057f6eb1c692--
> {code}
> And this is the Exception stacktrace:
> {code:borderStyle=solid}
> Invalid URI: line '6'. - org.apache.olingo.odata2.api.batch.BatchException:
> Invalid URI: line '6'.
> at
> org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.parseUri(BatchTransformatorCommon.java:216)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.parse(BatchTransformatorCommon.java:165)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchTransformatorCommon$HttpRequestStatusLine.<init>(BatchTransformatorCommon.java:156)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.createRequest(BatchRequestTransformator.java:85)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.processQueryOperation(BatchRequestTransformator.java:78)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchRequestTransformator.transform(BatchRequestTransformator.java:52)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchParser.parseBatch(BatchParser.java:86)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchParser.parse(BatchParser.java:64)
> at
> org.apache.olingo.odata2.core.batch.v2.BatchParser.parseBatchRequest(BatchParser.java:58)
> at
> org.apache.olingo.odata2.core.ep.ProviderFacadeImpl.parseBatchRequest(ProviderFacadeImpl.java:237)
> at
> org.apache.olingo.odata2.api.ep.EntityProvider.parseBatchRequest(EntityProvider.java:887)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)