Skip to content

Fix startup error with portable preferences#14732

Merged
calixtus merged 4 commits into
mainfrom
fix-14729
Dec 27, 2025
Merged

Fix startup error with portable preferences#14732
calixtus merged 4 commits into
mainfrom
fix-14729

Conversation

@calixtus

@calixtus calixtus commented Dec 27, 2025

Copy link
Copy Markdown
Member

Fixes #14729

Separates import to low level on startup from high level preferences import.
CliPreferences was not bound to JabRefCliPreferences, as with portable preferences, import of portable preferences xml is done in constructor of JabRefCliPreferences.

Steps to test

Use portable preferences.
Restart JabRef.

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • [.] I added JUnit tests for changes (if applicable)
  • [.] I added screenshots in the PR description (if change is visible to the user)
  • I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [.] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

@calixtus calixtus marked this pull request as ready for review December 27, 2025 12:22
@calixtus calixtus enabled auto-merge December 27, 2025 12:22
@Siedlerchr

Copy link
Copy Markdown
Member

Can we add a, test for this?

Merged via the queue into main with commit 72b6c76 Dec 27, 2025
86 of 104 checks passed
@calixtus calixtus deleted the fix-14729 branch December 27, 2025 13:13
@Doc73

Doc73 commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

The issue persists:

$ /opt/jabref/bin/JabRef
WARNING: Using incubator modules: jdk.incubator.vector
Messages are not initialized before accessing key: References
2025-12-27 15:03:27 [main] org.jabref.Launcher.main()
ERROR: Could not launch JabRef: java.lang.IllegalStateException: Cannot instantiate view: interface org.jabref.logic.preferences.CliPreferences
	at afterburner.fx/com.airhacks.afterburner.injection.Injector.lambda$getDefaultInstanceSupplier$6(Unknown Source)
	at afterburner.fx/com.airhacks.afterburner.injection.Injector.instantiateModelOrService(Unknown Source)
	at afterburner.fx/com.airhacks.afterburner.injection.Injector.instantiateModelOrService(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.MainTableColumnModel.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.MainTableColumnModel.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.ColumnPreferences.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.ColumnPreferences.getDefault(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.getMainTableColumnPreferences(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.importPreferences(Unknown Source)
	at org.jabref.jablib/org.jabref.logic.preferences.JabRefCliPreferences.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.getInstance(Unknown Source)
	at org.jabref/org.jabref.Launcher.main(Unknown Source)
Caused by: java.lang.InstantiationException: org.jabref.logic.preferences.CliPreferences
	at java.base/java.lang.Class.newInstance(Unknown Source)
	... 13 more
Caused by: java.lang.NoSuchMethodException: org.jabref.logic.preferences.CliPreferences.<init>()
	at java.base/java.lang.Class.getConstructor0(Unknown Source)
	... 14 more
Exception in thread "main" java.lang.IllegalStateException: Cannot instantiate view: interface org.jabref.logic.preferences.CliPreferences
	at afterburner.fx/com.airhacks.afterburner.injection.Injector.lambda$getDefaultInstanceSupplier$6(Unknown Source)
	at afterburner.fx/com.airhacks.afterburner.injection.Injector.instantiateModelOrService(Unknown Source)
	at afterburner.fx/com.airhacks.afterburner.injection.Injector.instantiateModelOrService(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.MainTableColumnModel.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.MainTableColumnModel.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.ColumnPreferences.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.maintable.ColumnPreferences.getDefault(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.getMainTableColumnPreferences(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.importPreferences(Unknown Source)
	at org.jabref.jablib/org.jabref.logic.preferences.JabRefCliPreferences.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.<init>(Unknown Source)
	at org.jabref/org.jabref.gui.preferences.JabRefGuiPreferences.getInstance(Unknown Source)
	at org.jabref/org.jabref.Launcher.main(Unknown Source)
Caused by: java.lang.InstantiationException: org.jabref.logic.preferences.CliPreferences
	at java.base/java.lang.Class.newInstance(Unknown Source)
	... 13 more
Caused by: java.lang.NoSuchMethodException: org.jabref.logic.preferences.CliPreferences.<init>()
	at java.base/java.lang.Class.getConstructor0(Unknown Source)
	... 14 more

@Siedlerchr

Siedlerchr commented Dec 27, 2025 via email

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JabRef doesn't start on Debian Sid

4 participants