Skip to content

Automatically set file links throws java error that is not shown to the user in the GUI #5890

@joelostblom

Description

@joelostblom

When I click Automatically set file links, JabRef shows the progress bar for a long time (close to a minute) and then a small toast message says that it is done, but no links are found. The event log inside JabRef does not show anything, but when I check the terminal from which I launch JabRef, I see the java error ERROR AutoSetFileLinksUtil Problem finding files.

I figured this is because I don't have permission to access a folder on my system, but it took me a while to figure this out because I was launching jabref via my systems menu and neither the toast message or the event log showed that anything was awry. It was only when I launched from the terminal that I could figure out what was going on. It would be nice to somehow inform the user in the GUI that there has been an error.

Full error:

$ jabref
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...

(JabRef:70588): Gdk-WARNING **: 11:51:12.817: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
ERROR AutoSetFileLinksUtil Problem finding files
 java.io.IOException: Problem in finding files
        at org.jabref/org.jabref.logic.util.io.CiteKeyBasedFileFinder.findFilesByExtension(Unknown Source)
        at org.jabref/org.jabref.logic.util.io.CiteKeyBasedFileFinder.findAssociatedFiles(Unknown Source)
        at org.jabref/org.jabref.gui.externalfiles.AutoSetFileLinksUtil.findAssociatedNotLinkedFiles(Unknown Source)
        at org.jabref/org.jabref.gui.externalfiles.AutoSetFileLinksUtil.linkAssociatedFiles(Unknown Source)
        at org.jabref/org.jabref.gui.externalfiles.AutoLinkFilesAction$1.call(Unknown Source)
        at org.jabref/org.jabref.gui.externalfiles.AutoLinkFilesAction$1.call(Unknown Source)
        at org.jabref.merged.module/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: /home/joel/gnupg2/crls.d
        at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(Unknown Source)
        at java.base/java.nio.file.FileTreeIterator.hasNext(Unknown Source)
        at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
        at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
        ... 13 more
Caused by: java.nio.file.AccessDeniedException: /home/joel/gnupg2/crls.d
        at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
        at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(Unknown Source)
        at java.base/java.nio.file.Files.newDirectoryStream(Unknown Source)
        at java.base/java.nio.file.FileTreeWalker.visit(Unknown Source)
        at java.base/java.nio.file.FileTreeWalker.next(Unknown Source)
        ... 22 more

I installed jabref via the AUR package jabref-latest:

JabRef 5.0-beta.382--2020-01-28--0b53d4b
Linux 5.4.14-arch1-1 amd64 
Java 13.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    [outdated] type: enhancementcomponent: uigood first issueAn issue intended for project-newcomers. Varies in difficulty.status: staleIssues marked by a bot as "stale". All issues need to be investigated manually.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions