JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.63k stars 2.59k forks source link

NullPointerException on editing bibtex file #1253

Closed ExecutorElassus closed 8 years ago

ExecutorElassus commented 8 years ago

JabRef version 2.10 on gentoo Linux

Steps to reproduce: This recently started happening (last week or so), without updating jabref itself, so I suspect it's a problem with a linked dependency. Anyway, I can neither create new entries nor edit existing ones. If I do, the following occurs:

  1. highlight an entry
  2. click the "edit" button or Ctrl-E
  3. the following pops up in the error log:

java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:434) at java.util.Properties.load0(Properties.java:353) at java.util.Properties.load(Properties.java:341) at com.michaelbaranov.microba.calendar.DefaultCalendarResources.(DefaultCalendarResources.java:28) at com.michaelbaranov.microba.calendar.CalendarPane.(CalendarPane.java:185) at com.michaelbaranov.microba.calendar.DatePicker.(DatePicker.java:120) at com.michaelbaranov.microba.calendar.DatePicker.(DatePicker.java:74) at net.sf.jabref.gui.date.DatePickerButton.(DatePickerButton.java:36) at net.sf.jabref.EntryEditor.getExtra(EntryEditor.java:426) at net.sf.jabref.EntryEditorTab.setupPanel(EntryEditorTab.java:155) at net.sf.jabref.EntryEditorTab.(EntryEditorTab.java:82) at net.sf.jabref.EntryEditor.setupFieldPanels(EntryEditor.java:273) at net.sf.jabref.EntryEditor.(EntryEditor.java:219) at net.sf.jabref.BasePanel.getEntryEditor(BasePanel.java:2357) at net.sf.jabref.gui.MainTableSelectionListener.editSignalled(MainTableSelectionListener.java:221) at net.sf.jabref.gui.MainTableSelectionListener.editSignalled(MainTableSelectionListener.java:215) at net.sf.jabref.BasePanel$2.action(BasePanel.java:366) at net.sf.jabref.BasePanel.runCommand(BasePanel.java:1666) at net.sf.jabref.JabRefFrame$GeneralAction.actionPerformed(JabRefFrame.java:1139) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6516) at javax.swing.JComponent.processMouseEvent(JComponent.java:3312) at java.awt.Component.processEvent(Component.java:6281) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4872) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747) at java.awt.EventQueue.access$300(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:706) at java.awt.EventQueue$3.run(EventQueue.java:704) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:720) at java.awt.EventQueue$4.run(EventQueue.java:718) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:77) at java.awt.EventQueue.dispatchEvent(EventQueue.java:717) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

JDK version is 8u77, jre is 1.8.0.

Cheers,

Siedlerchr commented 8 years ago

Would you please test with the actual version 3.3?

ExecutorElassus commented 8 years ago

Hi There,

Gentoo doesn't seem to have a compiling version above 2.10, and the jabref-bin package is only 3.2. Sorry if this might be a bit outside of your focus, but do you know of a source for a "live" ebuild to build from the most recent source?

Cheers,

ExecutorElassus commented 8 years ago

Update: downloaded the .jar file. Running 'java -jar JabRef-3.3.jar' from console results in the following:

Exception in thread "main" java.lang.UnsupportedClassVersionError: net/sf/jabref/JabRefMain : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

So, dang. Can't run 3.3, at all.

Siedlerchr commented 8 years ago

@ExecutorElassus You need to install java8 from Oracle Edit// https://packages.gentoo.org/packages/dev-java/oracle-jre-bin

@koppor Do you know about the gentoo/debian packages ? https://gpo.zugaina.org/app-text/jabref https://packages.debian.org/stable/tex/jabref

matthiasgeiger commented 8 years ago

Are you sure that you run the application with an Java 8 JRE? What is the output of java -version?

ExecutorElassus commented 8 years ago

Ah, I was on iceadtea-7 (ie, "IcedTea JDK 7.2.6.5 [icedtea-7]") which returned:

$ java -version java version "1.7.0_99" OpenJDK Runtime Environment (IcedTea 2.6.5) (Gentoo icedtea-7.2.6.5-r1) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

I switched to the Oracle VM, which now reads: $ java -version java version "1.8.0_77" Java(TM) SE Runtime Environment (build 1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

And version 3.3 runs fine. Ok, so chalk this up to an out-of-date version of jabref. Whoops. Thanks for clearing it up.

matthiasgeiger commented 8 years ago

No problem and enjoy working with the new version ;-)

mlep commented 8 years ago

@matthiasgeiger According to a message on the mailing list (this morning), JabRef 3 also works with OpenJDK 8.

matthiasgeiger commented 8 years ago

Yes. With an OpenJDK 8 it should work, too. However, there is that trouble with the GTK look-and-feel (see #393)