Rahuldeb Barman created OLINGO-973:
--------------------------------------
Summary: WstxParsingException while parsing the OData response
Key: OLINGO-973
URL: https://issues.apache.org/jira/browse/OLINGO-973
Project: Olingo
Issue Type: Bug
Components: odata2-core
Affects Versions: V2 2.0.7
Environment: Cent OS
Reporter: Rahuldeb Barman
Priority: Critical
Fix For: V2 2.0.7
WstxParsingException while parsing the OData response.
<?xml version="1.0" encoding="utf-8"?><feed
xml:base="https://XXX.crm.ondemand.com/sap/byd/odata/v1/c4codata/"
xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://XXX.crm.ondemand.com/sap/byd/odata/v1/c4codata/AccountCollection</id><title
type="text">AccountCollection</title><updated>2016-06-21T13:53:36Z</updated><author><name/></author><link
href="AccountCollection" rel="self"
title="AccountCollection"/><m:count>751</m:count><entry
m:etag="W/"datetimeoffset'2016-06-15T12%3A48%3A51.8255480Z'""><id>https://XXX.crm.ondemand.com/sap/byd/odata/v1/c4codata/AccountCollection('00163E038C2E1EE299C1BB0BE9398F9B')</id><title
type="text">AccountCollection('00163E038C2E1EE299C1BB0BE9398F9B')</title><updated>2016-06-21T13:53:36Z</updated><category
term="c4codata.Account"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link
href="AccountCollection('00163E038C2E1EE299C1BB0BE9398F9B')" rel="edit"
title="Account"/><content
type="application/xml"><m:properties><d:AccountName>Porter
LLC</d:AccountName><d:ObjectID>00163E038C2E1EE299C1BB0BE9398F9B</d:ObjectID></m:properties></content></entry></feed>
When attempting to read above message, an EntityProviderException is thrown as
shown below.
[6255] at
org.apache.olingo.odata2.api.ep.EntityProvider.readEntry(EntityProvider.java:714)
[6254] at
org.apache.olingo.odata2.core.ep.ProviderFacadeImpl.readEntry(ProviderFacadeImpl.java:178)
[6253] at
org.apache.olingo.odata2.core.ep.AtomEntityProvider.readEntry(AtomEntityProvider.java:374)
[6252] at
org.apache.olingo.odata2.core.ep.consumer.XmlEntityConsumer.readEntry(XmlEntityConsumer.java:91)
[6251] at
org.apache.olingo.odata2.core.ep.consumer.XmlEntryConsumer.readEntry(XmlEntryConsumer.java:87)
[6250] at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1113)
[6249] at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
[6248] at
com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630)
[6247] at [row,col {unknown-source}]: [1,1277]
[6246](IS) [CLS.0503.0120] 2016-06-21 18:15:22 IST ERROR: wraps:
com.ctc.wstx.exc.WstxParsingException: Received event END_DOCUMENT, instead of
START_ELEMENT or END_ELEMENT.
org.apache.olingo.odata2.api.ep.EntityProviderException: An exception of type
'WstxParsingException' occurred.
Note that I am using olingo 2.0.7 library (locally built using source code).
We have 3 environment setup, we have observed this error on one environment.
When we run our code in debug mode it works fine.
Looks like this error is not constant. Some time it works, sometime
WstxParsingException is seen.
What could be root cause and how to avoid this error. Any pointer? Please let
me know.
Thanks in advance.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)