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(
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(
        at java.base/java.nio.file.Path.of(
        at org.jabref@5.5/org.jabref.logic.citationstyle.CitationStyle.discoverCitationStyles(
        at org.jabref@5.5/org.jabref.gui.util.BackgroundTask$
        at org.jabref@5.5/org.jabref.gui.util.DefaultTaskExecutor$
        at java.base/
        at java.base/java.util.concurrent.Executors$
        at java.base/
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.base/java.util.concurrent.ThreadPoolExecutor$
        at java.base/

Could you please help? Thanks!


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.


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. - 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