Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quicken categories.qif uncaught exception #30

Open
matteg opened this issue Aug 22, 2017 · 9 comments
Open

Quicken categories.qif uncaught exception #30

matteg opened this issue Aug 22, 2017 · 9 comments

Comments

@matteg
Copy link

matteg commented Aug 22, 2017

I am trying to transfer historical data from Quicken 2015 into jGnash version 2.32.0
My Quicken accounts transferred with no difficulty
I imported transactions for a quicken account without difficulty although they were treated as one sided transactions (which means I need to eventually edit each one manually)

Given that Quicken categories are treated in jGnash as Accounts, I was hoping that importing a categories.qif file would create Expense or Income Accounts in jGnash. However when I attempted an import on Ubuntu Linux there was no prompt for date format and I received an uncaught exception:
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.(Matcher.java:229)
at java.util.regex.Pattern.matcher(Pattern.java:1093)
at java.util.regex.Pattern.split(Pattern.java:1206)
at java.util.regex.Pattern.split(Pattern.java:1273)
at jgnash.convert.imports.qif.QifTransaction.determineDateFormat(QifTransaction.java:87)
at jgnash.convert.imports.qif.QifAccount.getTransactions(QifAccount.java:43)
at jgnash.convert.imports.qif.QifParser.parsePartialFile(QifParser.java:171)
at jgnash.convert.imports.qif.QifParser.parsePartialFile(QifParser.java:98)
at jgnash.convert.imports.qif.QifImport.doPartialParse(QifImport.java:108)
at jgnash.ui.actions.ImportQifAction.importQif(ImportQifAction.java:137)
at jgnash.ui.actions.ImportQifAction.actionPerformed(ImportQifAction.java:195)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

@matteg
Copy link
Author

matteg commented Aug 22, 2017

I repeated the test using jgnash2.exe on windows 10 with similar results:
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Unknown Source)
at java.util.regex.Matcher.reset(Unknown Source)
at java.util.regex.Matcher.(Unknown Source)
at java.util.regex.Pattern.matcher(Unknown Source)
at java.util.regex.Pattern.split(Unknown Source)
at java.util.regex.Pattern.split(Unknown Source)
at jgnash.convert.imports.qif.QifTransaction.determineDateFormat(QifTransaction.java:87)
at jgnash.convert.imports.qif.QifAccount.getTransactions(QifAccount.java:43)
at jgnash.convert.imports.qif.QifParser.parsePartialFile(QifParser.java:171)
at jgnash.convert.imports.qif.QifParser.parsePartialFile(QifParser.java:98)
at jgnash.convert.imports.qif.QifImport.doPartialParse(QifImport.java:108)
at jgnash.ui.actions.ImportQifAction.importQif(ImportQifAction.java:137)
at jgnash.ui.actions.ImportQifAction.actionPerformed(ImportQifAction.java:195)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

@ccavanaugh
Copy link
Owner

Can you provide a snippet of a file with the date? QIF is broken and the date format is not standard.
Can you export OFX/QFX files from Quicken? Results will be much better.

@matteg
Copy link
Author

matteg commented Aug 23, 2017 via email

@matteg
Copy link
Author

matteg commented Aug 23, 2017 via email

@ccavanaugh
Copy link
Owner

OFX is an open standard text based standard and QFX should only contain a couple of extra fields.

I understand completely about not sharing a complete file. Let's see what I can do with the snippet first.

And also (to show a day number January 16, 2006:
D1/16' 5

Is this a typo and the year is actually 2005?

@matteg
Copy link
Author

matteg commented Aug 23, 2017 via email

@matteg
Copy link
Author

matteg commented Aug 23, 2017 via email

@ccavanaugh
Copy link
Owner

No idea why an OFX would be binary... that would be a first for me. Anyway...

The existing code should handle the date format correctly, but it appears as there is an offending transaction without a date triggering the null pointer exception and preventing the import from getting far enough to display the dialog.

Are you able to compile and run from code? If not, you can send the test file to jgnash.devel@gmail.com

@matteg
Copy link
Author

matteg commented Aug 24, 2017 via email

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

No branches or pull requests

2 participants