Switch to org.postgresql#4031
Conversation
| } | ||
|
|
||
| // Wait a while before checking again for new notifications | ||
| Thread.sleep(500); |
There was a problem hiding this comment.
Doesn't the driver support push notifications?
There was a problem hiding this comment.
Frm the official doc it supports it:
https://jdbc.postgresql.org/documentation/head/listennotify.html#listen-notify-example
| // Do not use `new PostgresSQLNotificationListener(...)` as the object has to exist continuously! | ||
| // Otherwise the listener is going to be deleted by GC. | ||
| pgConnection.addNotificationListener(listener); | ||
| PGConnection pgConnection = connection.unwrap(PGConnection.class); |
There was a problem hiding this comment.
Please remove the above comment, which contradicts the new code.
Has someone tested the new implementation?
There was a problem hiding this comment.
I can try to test it this evening. I think I have a pg sql db somewhere lying around
|
Database test seems to be green. I will try to test this manually. |
|
We do not have any test for the remote database feature (refs #3282). There are free postgres hostings (see http://help.jabref.org/en/SQLDatabase#try-it-out) to try it out. It is important that at least two different JabRef instances are connected. |
|
@Siedlerchr It would be nice if you could try it out. In the forum it was said that this version does not work since postgre does not show up as an option. As I have absolutely no experience with the database-related code, I highly welcome help on this PR. |
|
17:44:13.731 [JavaFX Application Thread] INFO org.jabref.logic.shared.DBMSConnection - PostgreSQL driver not available. |
fix driver setup connection
|
So I managed to get the connection working. However, it's currently unusable due to the same error the importer has: (Just import a new bib file) The problem is the "addTab" Method which creates a new basePanel and fails as the PreviewPanel is not on FX thread. However, I tried wrapping the call to it in the FXThread, but that did just lead to a complete freeze. I don't know how to solve this |
|
I would propose to merge this changes. And I am currently reworking the shared db dialog to FX, so that the problem with the exception of the import should be solved |
* upstream/maintable-beta: Switch to org.postgresql (#4031)
* upstream/maintable-beta: (46 commits) update gradle to 4.7 (#4049) Add missing translation for "HTML to Unicode" (#4046) New Crowdin translations (#4042) Use all-text-fields magic also in BibTeX cleanup. (#4039) Switch to org.postgresql (#4031) Fix freeze when importing (#4037) Use JavaFX-native SVGPath for logo in About dialog (#4035) Remove reflection hack to set WM_CLASS (#4034) Fix initial freeze when downloading files Inline comment Move color related method Extract dialog service to field Extract dialog service to field Remove unused class Show tooltip for icon-based columns Remove commented-out code Convert static methods to instance members (and fix spelling) Fix formatting Fix formatting Remove unused argument ... # Conflicts: # build.gradle # gradle/wrapper/gradle-wrapper.properties # src/main/java/org/jabref/gui/GUIGlobals.java # src/main/java/org/jabref/gui/SidePaneComponent.java # src/main/java/org/jabref/gui/groups/GroupModeViewModel.java # src/main/java/org/jabref/gui/groups/GroupSidePane.java # src/main/java/org/jabref/gui/help/AboutDialogView.java # src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java # src/main/java/org/jabref/logic/shared/PostgreSQLProcessor.java # src/main/resources/l10n/JabRef_en.properties
In the forum, there were some reports that the postgre SQL integration sometimes fails due to a bug in the sql driver we use. It appears that the driver pgjdbc-ng is no longer maintained and all the features we need are present in the "official driver". Thus I switched to the later in the hope that it fixes the issues mentioned in the forum.