Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

org.n52.oxf.OXFException: Could not parse response to XML #152

Open
meliezer opened this issue Dec 10, 2014 · 2 comments
Open

org.n52.oxf.OXFException: Could not parse response to XML #152

meliezer opened this issue Dec 10, 2014 · 2 comments

Comments

@meliezer
Copy link

It's not easy reproducing it, but it seems that sometimes there is an attempt to read the xml reply before it's ready.

[EESDataServiceImpl.java:56] Performing EES overview data request
..
Caused by: org.n52.server.da.AccessException: Could not execute GetObservation request.
        at org.n52.server.da.oxf.ObservationAccessor.sendRequest(ObservationAccessor.java:141) ~[ObservationAccessor.class:na]
..
Caused by: org.n52.oxf.OXFException: Could not parse response to XML.
        at org.n52.oxf.sos.adapter.SOSAdapter.doOperation(SOSAdapter.java:302) ~[SOSAdapter.class:2.0.0-alpha.3.3]
        at org.n52.server.da.oxf.SOSAdapter_OXFExtension.doOperation(SOSAdapter_OXFExtension.java:86) ~[SOSAdapter_OXFExtension.class:na]
        at org.n52.server.da.oxf.OperationAccessor.call(OperationAccessor.java:55) ~[OperationAccessor.class:na]
        at org.n52.server.da.oxf.OperationAccessor.call(OperationAccessor.java:39) ~[OperationAccessor.class:na]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_65]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
        ... 1 common frames omitted
Caused by: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
        at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3511) ~[Locale$SaxLoader.class:na]
        at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1277) ~[Locale.class:na]
        at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1264) ~[Locale.class:na]
        at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345) ~[SchemaTypeLoaderBase.class:na]
        at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:688) ~[XmlObject$Factory.class:2.6.0-r1364789]
        at org.n52.oxf.sos.adapter.SOSAdapter.doOperation(SOSAdapter.java:296) ~[SOSAdapter.class:2.0.0-alpha.3.3]
        ... 7 common frames omitted
Caused by: org.xml.sax.SAXParseException: Unexpected end of file after null
        at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038) ~[Piccolo.class:na]
        at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723) ~[Piccolo.class:na]
        at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3479) ~[Locale$SaxLoader.class:na]
@meliezer
Copy link
Author

Maybe it can help: Apache Commons IO released v1.4 which includes an AutoCloseInputStream wrapper which cleans up InputStreams once they have been read.
http://commons.apache.org/io/api-release/org/apache/commons/io/input/AutoCloseInputStream.html

@ridoo
Copy link
Member

ridoo commented Feb 26, 2015

yeah ... I know this error and also solved such error by wrapping XMLbeans streams with AutoCloseInputStream you proposed.

Perhaps I missed that location ... I'll check! Anyway, this issue relates to the https://github.com/52North/OX-Framework AFAICS ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants