Error after Generating the Citation Key

I created an individual entry type “online”. All topics with this entry type work correct but this one (BibTex-Source):
@Online{,
author = {{SPD, Buendnis 90/Die Gruenen und FDP}},
title = {{Mehr Fortschritt wagen - Koalitionsvertrag 2021 – 2025 zwischen der Sozialdemokratischen Partei Deutschlands (SPD), BUENDNIS 90 / DIE GRUENEN und den Freien Demokraten (FDP) }},
url = {https://www.spd.de/fileadmin/Dokumente/Koalitionsvertrag/Koalitionsvertrag_2021-2025.pdf},
year = {2021},
}

As soon I create the citation key, ther is an Error-Message shown:
“Uncaught exception occured in Thread[JAVA FX Application Thread,5,main]”

I use JabRef 5.3

This depends on which fields you use to create the citationkey.

Could you show us a screenshot of your preferences for the citation key generator? You can find this under options>preferences>Citation key generator.

Also the full error message would be helpful

Citation key generator (Standard):

Errormessage:

… and

(As a new User I can’t upload all three pictures at once)

Ah, yes the new user limitation :sweat_smile:

You could select the whole text via Ctrl+A and then copy (Ctrl + C) and paste it (Ctrl + V)

Here it is:
java.lang.NegativeArraySizeException: -5
at java.base/java.lang.AbstractStringBuilder.(Unknown Source)
at java.base/java.lang.StringBuilder.(Unknown Source)
at org.jabref@5.3.60000/org.jabref.model.strings.StringUtil.repeat(Unknown Source)
at org.jabref@5.3.60000/org.jabref.model.strings.StringUtil.repeatSpaces(Unknown Source)
at org.jabref@5.3.60000/org.jabref.logic.bibtex.BibEntryWriter.getFormattedFieldName(Unknown Source)
at org.jabref@5.3.60000/org.jabref.logic.bibtex.BibEntryWriter.writeField(Unknown Source)
at org.jabref@5.3.60000/org.jabref.logic.bibtex.BibEntryWriter.writeRequiredFieldsFirstRemainingFieldsSecond(Unknown Source)
at org.jabref@5.3.60000/org.jabref.logic.bibtex.BibEntryWriter.writeWithoutPrependedNewlines(Unknown Source)
at org.jabref@5.3.60000/org.jabref.gui.entryeditor.SourceTab.getSourceString(Unknown Source)
at org.jabref@5.3.60000/org.jabref.gui.entryeditor.SourceTab.lambda$updateCodeArea$6(Unknown Source)
at org.jabref@5.3.60000/org.jabref.gui.util.DefaultTaskExecutor.runAndWaitInJavaFXThread(Unknown Source)
at org.jabref@5.3.60000/org.jabref.gui.entryeditor.SourceTab.updateCodeArea(Unknown Source)
at org.jabref@5.3.60000/org.jabref.gui.entryeditor.SourceTab.lambda$bindToEntry$8(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.collections.MapListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.collections.ObservableMapWrapper.callObservers(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.collections.ObservableMapWrapper.put(Unknown Source)
at org.jabref@5.3.60000/org.jabref.model.entry.BibEntry.setField(Unknown Source)
at org.jabref@5.3.60000/org.jabref.model.entry.BibEntry.setField(Unknown Source)
at org.jabref@5.3.60000/org.jabref.model.entry.BibEntry.setCitationKey(Unknown Source)
at org.jabref@5.3.60000/org.jabref.logic.citationkeypattern.CitationKeyGenerator.generateAndSetKey(Unknown Source)
at org.jabref@5.3.60000/org.jabref.gui.citationkeypattern.GenerateCitationKeySingleAction.execute(Unknown Source)
at org.jabref@5.3.60000/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
at org.jabref.merged.module@5.3.60000/org.controlsfx.control.action.Action.handle(Unknown Source)
at org.jabref.merged.module@5.3.60000/org.controlsfx.control.action.Action.handle(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/javafx.event.Event.fireEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/javafx.scene.Node.fireEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/javafx.scene.control.Button.fire(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/javafx.event.Event.fireEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/javafx.scene.Scene$MouseHandler.process(Unknown Source)
at org.jabref.merged.module@5.3.60000/javafx.scene.Scene.processMouseEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.glass.ui.View.notifyMouse(Unknown Source)
at org.jabref.merged.module@5.3.60000/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at org.jabref.merged.module@5.3.60000/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Ok, since i personally wouldn’t know how to interpret this error message (there might be others who can), i would start by trying to remove special characters one by one, until you find a culprit.

e.g. /, - ()

The empty space at the end of the title field looks suspicious too.

I guess only the author and title field should be of relevance.

I solved it :smile:

Defining the entry type I added the “citationkey”-field manually. So it was doubled. Removing that in the entry-Type editor solved the problem.

2 Likes

We recently added a fix for this specific error message in the development version, so that at least the error message is not coming up again. It was related to the calculation of the indentation.

1 Like