You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by brunobat <br...@gmail.com> on 2016/09/19 13:35:42 UTC

Parsing errors in large XML documents

Hi,
I'm using the webclient to access a rest endpoint behind a gateway that
requires authentication and HTTPS. The REST endpoint uses XML content type
and returns a list of entities (>1000 lines of XML). Just 1 thread is used.
Everything works great if the number of entities is low, let's say 50.
As soon as I increase the number of requested entities to, let's say 100, I
start to see parsing errors in the XML.
With CXF 2.6.16 I get:

Caused by: java.io.IOException: missing CR
	at
sun.net.www.http.ChunkedInputStream.processRaw(ChunkedInputStream.java:405)
	at
sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:572)
	at
sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
	at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
	at java.io.FilterInputStream.read(FilterInputStream.java:133)
	at
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3336)
	at org.apache.cxf.helpers.IOUtils.copyAtLeast(IOUtils.java:172)
	at
org.apache.cxf.interceptor.LoggingInInterceptor.logInputStream(LoggingInInterceptor.java:173)

If I use CXF 3.1.6 I get multiple errors depending on the execution:
cxf errors Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException:
Unexpected character '<'...
or
com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </p>; expected
</br>...


The stream from the server comes URL encoded, hence it's XML friendly. And I
remind you, with less entities it works perfectly.
Any idea on what might be happening?




--
View this message in context: http://cxf.547215.n5.nabble.com/Parsing-errors-in-large-XML-documents-tp5772862.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Parsing errors in large XML documents

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

It looks like you are getting some error message in HTML, unless your 
XML can contain tags like <br> and <p> ?

Also note CXF 3.0.x is the oldest active CXF line, 3.0.10 is the last 
release

Cheers, Sergey
On 19/09/16 14:35, brunobat wrote:
> Hi,
> I'm using the webclient to access a rest endpoint behind a gateway that
> requires authentication and HTTPS. The REST endpoint uses XML content type
> and returns a list of entities (>1000 lines of XML). Just 1 thread is used.
> Everything works great if the number of entities is low, let's say 50.
> As soon as I increase the number of requested entities to, let's say 100, I
> start to see parsing errors in the XML.
> With CXF 2.6.16 I get:
>
> Caused by: java.io.IOException: missing CR
> 	at
> sun.net.www.http.ChunkedInputStream.processRaw(ChunkedInputStream.java:405)
> 	at
> sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:572)
> 	at
> sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
> 	at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
> 	at java.io.FilterInputStream.read(FilterInputStream.java:133)
> 	at
> sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3336)
> 	at org.apache.cxf.helpers.IOUtils.copyAtLeast(IOUtils.java:172)
> 	at
> org.apache.cxf.interceptor.LoggingInInterceptor.logInputStream(LoggingInInterceptor.java:173)
>
> If I use CXF 3.1.6 I get multiple errors depending on the execution:
> cxf errors Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException:
> Unexpected character '<'...
> or
> com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </p>; expected
> </br>...
>
>
> The stream from the server comes URL encoded, hence it's XML friendly. And I
> remind you, with less entities it works perfectly.
> Any idea on what might be happening?
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Parsing-errors-in-large-XML-documents-tp5772862.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/