Something went wrong while adding the discovered CitationStyles to the list

I’m trying building JabRef 5.5 on NixOS. I got this error when I open preference.

2022-02-27 21:26:04 [JavaFX Application Thread] org.jabref.gui.preferences.preview.PreviewTabViewModel.lambda$setValues$6()
ERROR: Something went wrong while adding the discovered CitationStyles to the list.: java.nio.file.FileSystemNotFoundException
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:156)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:142)
        at java.base/java.nio.file.Path.of(Path.java:208)
        at org.jabref@5.5/org.jabref.logic.citationstyle.CitationStyle.discoverCitationStyles(CitationStyle.java:142)
        at org.jabref@5.5/org.jabref.gui.util.BackgroundTask$1.call(BackgroundTask.java:59)
        at org.jabref@5.5/org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:162)
        at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)

Could you please help? Thanks!

Hi,

it seem you are missing the citation styles. They are only copied over from buildres/csl to src/main/resources during the building of the jpackage installers.
This could be one reason.

Thanks for your reply. I copied them as the arch package PKGBUILD - aur.git - AUR Package Repositories. I’m sure the files are there when I built JabRef.

Okay,

I looked a bit into it, there seems to be something different with the paths.
Can you check if the portable version works without problems?

Thanks! The JabRef on NixOS is currently a patched version of the portable tarball. 5.3 works but 5.5 crashes. See nixpkgs/default.nix at nixos-21.11 · NixOS/nixpkgs · GitHub, lots of patches are required. I thought it’s much easier to build it from source and it does work well except this problem. The portable version won’t work with patches. I checked the jar and the style files are there. Maybe it’s something related to java on NixOS.

I copied this line and it works now! But I’m confused why it’s needed. jabref.sh - aur.git - AUR Package Repositories

I opened a PR for NixOS. JabRef: build from source by linsui · Pull Request #162593 · NixOS/nixpkgs · GitHub

Ah glad to hear, I can only speculate that Java’s ClassLoader can’t find the module path/class path or searches otherwise in the wrong directory

PS: The next version will require java 17

I’m using Java 17 already. Since Arch has the same issue, maybe this should be fixed in JabRef?

I’m currently also looking in the csl library class path loading due to a different issue.

We built our packages using jpackage and the gradle plug-in merges different modules together, so this could be somehow a thing.

1 Like