Martin Woolley wrote:
> Hi
>
> I'm stress testing an application that uses XPP3. I'm seeing the
> following stacktrace sporadically:
>
> java.io.EOFException: no more data available
> Thread-5: at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2659)
> Thread-5: at org.xmlpull.mxp1.MXParser.more(MXParser.java:2666)
> Thread-5: at
> org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1385)
> Thread-5: at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1370)
> Thread-5: at org.xmlpull.mxp1.MXParser.next(MXParser.java:1111)
> Thread-5: at
>
com.nmss.ms.agent.api.XppStreamHandler.processDocument(XppStreamHandler.java:67)
> Thread-5: at com.nmss.ms.agent.api.ApiWorker.run(ApiWorker.java:193)
> Thread-5: at java.lang.Thread.run(Thread.java:534)
>
>
> I have checked the XML input document and it looks fine.
>
> My instincts tell me I've hit some kind of synchronisation issue....
> but I could be wildly wrong.
>
are you using the same parser instance in multiple threads? this is not
supported. as noted in docs and as it is usual for XML parser: XPP3 is
not multi thread safe and each thread should have its own instance of
parser. you can use parser pool (see xmlpull.org addons) if you want to
recycle parser instances (run some perf test with and without pooling ot
make sure you get optimal perf)
HTH,
Alek
> Are there are known issues that produce this Exception?
>
> Thank in anticipation
>
> Martin
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
--
The best way to predict the future is to invent it - Alan Kay