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

Fix local metadata synchronization (fixes: #2219) #2300

Merged

Conversation

obraliar
Copy link
Contributor

Issue: #2219.

This issue is fixed by overloading and using the parse(...) method in MetaDataParser.

The reason was a reset of the local field metaData in DBMSSynchronizer. This caused other instances containing this field not to be up-to-date.

  • Change in CHANGELOG.md described
  • Manually tested changed features in running JabRef

- Overload the parse method in MetaDataParser
- Update the call of parse method
- Update CHANGELOG.md
@obraliar obraliar changed the title Fix local metadata synchronization (fixes: https://github.com/JabRef/jabref/issues/2219) Fix local metadata synchronization (fixes: #2219) Nov 20, 2016
@Siedlerchr Siedlerchr added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Nov 20, 2016
@koppor koppor merged commit 7ecb509 into JabRef:master Nov 20, 2016
@koppor
Copy link
Member

koppor commented Nov 20, 2016

I merged it, because it is a hotfix. @obraliar Do you think, it is possible to add a testcase for that?

@koppor
Copy link
Member

koppor commented Nov 20, 2016

I am testing PostgreSQL using ElephantSQL.com. I am having autosave activated. I restart JabRef. I get following exception:

20:56:15.998 [AWT-EventQueue-0] INFO  net.sf.jabref.logic.importer.OpenDatabase - Opening: C:\Users\koppor\BTSync\Projects\2016-11 - Dagstuhl-Paper\dagstuhl.bib
Nov 20, 2016 8:56:22 PM com.google.common.eventbus.EventBus$LoggingHandler handleException
SEVERE: Exception thrown by subscriber method listen(net.sf.jabref.model.metadata.event.MetaDataChangedEvent) on subscriber net.sf.jabref.shared.DBMSSynchronizer@6695f8f3 when dispatching event: net.sf.jabref.model.metadata.event.MetaDataChangedEvent@6f7e5617
java.lang.NullPointerException
        at net.sf.jabref.shared.PostgreSQLProcessor.notifyClients(PostgreSQLProcessor.java:126)
        at net.sf.jabref.shared.DBMSSynchronizer.listen(DBMSSynchronizer.java:127)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
at net.sf.jabref.model.metadata.MetaData.postChange(MetaData.java:202)
        at net.sf.jabref.model.metadata.MetaData.setMode(MetaData.java:143)
        at net.sf.jabref.logic.importer.util.MetaDataParser.parse(MetaDataParser.java:69)
        at net.sf.jabref.shared.DBMSSynchronizer.synchronizeLocalMetaData(DBMSSynchronizer.java:264)
        at net.sf.jabref.shared.DBMSSynchronizer.initializeDatabases(DBMSSynchronizer.java:157)
        at net.sf.jabref.shared.DBMSSynchronizer.openSharedDatabase(DBMSSynchronizer.java:353)
        at net.sf.jabref.shared.DBMSSynchronizer.openSharedDatabase(DBMSSynchronizer.java:358)
        at net.sf.jabref.gui.shared.SharedDatabaseUIManager.openSharedDatabaseFromParserResult(SharedDatabaseUIManager.java:140)
        at net.sf.jabref.JabRefGUI.openWindow(JabRefGUI.java:117)
        at net.sf.jabref.JabRefGUI.<init>(JabRefGUI.java:63)
        at net.sf.jabref.JabRefMain.lambda$start$1(JabRefMain.java:136)

@obraliar
Copy link
Contributor Author

@koppor oh yes this now also fixed. Thanks for the objection.

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

Successfully merging this pull request may close these issues.

None yet

3 participants