Initialize System Properties and Unexpected end in prolog
kaikun213 opened this issue · 1 comments
Hello,
I tried around with the example to setup the speed configuration for the XML-Parser and got the following problems:
First it did not find the InputFactoryImpl so I had to add it specifically to the system properties:
System.setProperty("com.fasterxml.aalto.stax.InputFactoryImpl","com.fasterxml.aalto.stax.InputFactoryImpl");
And secondly if I try to run it on an ordinary XML-File it gives me:
Exception in thread "main" com.fasterxml.aalto.WFCException: Unexpected End-of-input in prolog at [row,col {unknown-source}]: [1,1] at com.fasterxml.aalto.stax.StreamReaderImpl.throwWfe(StreamReaderImpl.java:1775) at com.fasterxml.aalto.stax.StreamReaderImpl.throwUnexpectedEOI(StreamReaderImpl.java:1794) at com.fasterxml.aalto.stax.StreamReaderImpl.handlePrologEoi(StreamReaderImpl.java:1754) at com.fasterxml.aalto.stax.StreamReaderImpl.next(StreamReaderImpl.java:810) at com.fasterxml.aalto.speedtest.SpeedTest.execute(SpeedTest.java:27) at com.fasterxml.aalto.speedtest.SpeedTest.main(SpeedTest.java:47)
I followed the basic STAX setup e.g. as described here:
http://www.studytrails.com/java/xml/aalto/java-xml-aalto-stax-parsing/
Any suggestions to resolve this?
Kind regards
First of all: in future, please do not add multiple problems into single issue, as doing so can complicate tracking of what is fixed where.
But as to system properties, they should not be necessary as there is META-INF/services
metadata included for Stax implementations.
As to second problem, you would need to show a reproduction of EXACTLY WHAT you are doing.
It is not enough to link to some article you claim to have followed. You will need to show what you tried.