You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" java.lang.IllegalStateException: java.io.IOException: Unexpected EOF
at com.webcohesion.ofx4j.io.AggregateUnmarshaller.unmarshal(AggregateUnmarshaller.java:70)
at com.plantango.ofx.App.main(App.java:38)
Caused by: java.io.IOException: Unexpected EOF
at net.n3.nanoxml.StdXMLReader.read(Unknown Source)
at net.n3.nanoxml.XMLUtil.read(Unknown Source)
at net.n3.nanoxml.ContentReader.read(Unknown Source)
at net.n3.nanoxml.ContentReaderBackdoor.read(ContentReaderBackdoor.java:24)
at java.base/java.io.Reader.read(Reader.java:229)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.readCharacters(NanoXMLOFXReader.java:200)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.processOFXTag(NanoXMLOFXReader.java:173)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.processOFXTag(NanoXMLOFXReader.java:150)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.processOFXTag(NanoXMLOFXReader.java:150)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.processOFXTag(NanoXMLOFXReader.java:150)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.processOFXTag(NanoXMLOFXReader.java:150)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.processOFXTag(NanoXMLOFXReader.java:150)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.processOFXTag(NanoXMLOFXReader.java:150)
at com.webcohesion.ofx4j.io.nanoxml.NanoXMLOFXReader.parseV1FromFirstElement(NanoXMLOFXReader.java:52)
at com.webcohesion.ofx4j.io.BaseOFXReader.parse(BaseOFXReader.java:113)
at com.webcohesion.ofx4j.io.AggregateUnmarshaller.unmarshal(AggregateUnmarshaller.java:63)
... 1 more
Note the unescaped & in the memo. I tried parsing and converting with the Python library ofxtools which worked without issues. The OFX v1 spec itself doesn't seem to require escaping special symbols like & AFAIK.
Escaping ampersand by replacing the & with & fixed the issue for me. I don't know if we wan't to fix this in the library (or just recommend preprocessing the file) but a better error message would definitively be helpful
The text was updated successfully, but these errors were encountered:
nicoepp
changed the title
Ampersand in OFX file not supported
Ampersand in OFX v1 file not supported
Oct 19, 2021
An OFX v1 file downloaded from CIBC contained a line similar to the following
<MEMO>DEBIT MEMO 05987 EFT CREDIT PAYMENT REVERSAL ABM CHANNEL & CARD MANAGEMT SE
resulting in the following stacktrace:
Note the unescaped
&
in the memo. I tried parsing and converting with the Python library ofxtools which worked without issues. The OFX v1 spec itself doesn't seem to require escaping special symbols like&
AFAIK.Escaping ampersand by replacing the
&
with&
fixed the issue for me. I don't know if we wan't to fix this in the library (or just recommend preprocessing the file) but a better error message would definitively be helpfulThe text was updated successfully, but these errors were encountered: