I can’t connect to certain PostgreSQL servers with JabRef 4.0 & 4.1 & JabRef-4.2-dev–snapshot–2018-04-04–master–fe90b1a0e.jar.
Let me know if you think this is a bug and should be reported on https://github.com/JabRef/jabref/issues.
If I install PostgreSQL 9.6 onto my local machine (from the EnterpriseDB postgresql-9.6.8-1-windows-x64.exe) I can connect to it using e.g. DBeaver and pgAdmin4 but when I go into JabRef 4.2, 4.1 or 4.0 and do:
File>Connect to shared database
Library type: PostgreSQL
Host: localhost
Port: 5432
Library: postgres
User: postgres
Password: xxxxx
It will hang at that window at “Connecting…”, no tables will be created and the sessions tab in pgAdmin4 shows only one process for “pgjdbc app” with Status=idle.
The same happens when I try to connect to a PostgreSQL server with JabRef 4.0-4.2 from a different machine on my network.
I’m using jre1.8.0_162 but have also got the same results with 152 and 161.
However, I can connect to the server using JabRef versions 3.6, 3.7, 3.8, 3.8.1, 3.8.2. JabRef will connect almost straight away, create three tables (ENTRY, FIELD & METADATA) in the public schema and show up in the sessions tab in pgAdmin4 as two (sometimes one) processes for “pgjdbc app” with Status=idle.
Also, if I create a free PostgreSQL instance on elephantsql(dot)com I can go into JabRef 4.0-4.2 and do:
File>Connect to shared database
Library type: PostgreSQL
Host: elephantsql url
Port: 5432
Library: the name of my default database
User: the name of my default user (same as my default database)
Password: xxxxx
And JabRef will connect almost straight away, create three tables (ENTRY, FIELD & METADATA) in the public schema and show up in the sessions tab in pgAdmin4 as two processes for “pgjdbc app” with Status=idle.
The elephantsql instance was “PostgreSQL 9.4.1 on x86_64-unknown-linux-gpu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit”
If I run “java -jar JabRef-4.1.jar -d all” at the command line I get:
Setting all preferences to default values.
File: grouptree.fxml not found, attempting with camel case
File: grouptree.css not found, attempting with camel case
and then when I try to connect to the postgresql database from JabRef I get:
10:36:23.825 [AWT-EventQueue-0] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception occurred in Thread[AWT-EventQueue-0,6,main]
java.lang.NullPointerException: null
at com.impossibl.postgres.system.BasicContext.loadLocale(BasicContext.java:294) ~[JabRef-4.1.jar:?]
at com.impossibl.postgres.system.BasicContext.init(BasicContext.java:273) ~[JabRef-4.1.jar:?]
at com.impossibl.postgres.jdbc.PGConnectionImpl.init(PGConnectionImpl.java:251) ~[JabRef-4.1.jar:?]
at com.impossibl.postgres.jdbc.ConnectionUtil.createConnection(ConnectionUtil.java:182) ~[JabRef-4.1.jar:?]
at com.impossibl.postgres.jdbc.PGDriver.connect(PGDriver.java:78) ~[JabRef-4.1.jar:?]
at com.impossibl.postgres.jdbc.PGDriver.connect(PGDriver.java:53) ~[JabRef-4.1.jar:?]
at java.sql.DriverManager.getConnection(Unknown Source) ~[?:1.8.0_162]
at java.sql.DriverManager.getConnection(Unknown Source) ~[?:1.8.0_162]
at org.jabref.shared.DBMSConnection.<init>(DBMSConnection.java:36) ~[JabRef-4.1.jar:?]
at org.jabref.shared.DBMSSynchronizer.openSharedDatabase(DBMSSynchronizer.java:360) ~[JabRef-4.1.jar:?]
at org.jabref.gui.shared.SharedDatabaseUIManager.openNewSharedDatabaseTab(SharedDatabaseUIManager.java:112) ~[JabRef-4.1.jar:?]
at org.jabref.gui.shared.ConnectToSharedDatabaseDialog.openSharedDatabase(ConnectToSharedDatabaseDialog.java:143) ~[JabRef-4.1.jar:?]
at org.jabref.gui.shared.ConnectToSharedDatabaseDialog$1.actionPerformed(ConnectToSharedDatabaseDialog.java:185) ~[JabRef-4.1.jar:?]
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.DefaultButtonModel.setPressed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.processMouseEvent(Unknown Source) ~[?:1.8.0_162]
at javax.swing.JComponent.processMouseEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.processEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Container.processEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Window.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue.access$500(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_162]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_162]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_162]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_162]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_162]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) ~[?:1.8.0_162]
at java.awt.WaitDispatchSupport$2.run(Unknown Source) ~[?:1.8.0_162]
at java.awt.WaitDispatchSupport$4.run(Unknown Source) ~[?:1.8.0_162]
at java.awt.WaitDispatchSupport$4.run(Unknown Source) ~[?:1.8.0_162]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_162]
at java.awt.WaitDispatchSupport.enter(Unknown Source) ~[?:1.8.0_162]
at java.awt.Dialog.show(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.show(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.setVisible(Unknown Source) ~[?:1.8.0_162]
at java.awt.Window.setVisible(Unknown Source) ~[?:1.8.0_162]
at java.awt.Dialog.setVisible(Unknown Source) ~[?:1.8.0_162]
at org.jabref.gui.actions.ConnectToSharedDatabaseAction.actionPerformed(ConnectToSharedDatabaseAction.java:29) ~[JabRef-4.1.jar:?]
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.DefaultButtonModel.setPressed(Unknown Source) ~[?:1.8.0_162]
at javax.swing.AbstractButton.doClick(Unknown Source) ~[?:1.8.0_162]
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) ~[?:1.8.0_162]
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) ~[?:1.8.0_162]
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.processMouseEvent(Unknown Source) ~[?:1.8.0_162]
at javax.swing.JComponent.processMouseEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.processEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Container.processEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Window.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue.access$500(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_162]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_162]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_162]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_162]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_162]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:1.8.0_162]
at java.awt.EventDispatchThread.run(Unknown Source) ~[?:1.8.0_162]