Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when trying to save linked file #3818

Closed
erelsgl opened this issue Mar 8, 2018 · 5 comments
Closed

Exception when trying to save linked file #3818

erelsgl opened this issue Mar 8, 2018 · 5 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs ui

Comments

@erelsgl
Copy link

erelsgl commented Mar 8, 2018

JabRef 4.2-dev--snapshot--2018-03-06--master--bb471a26d
Linux 4.4.0-104-generic amd64
Java 1.8.0_161

Steps to reproduce:

  1. Create an entry with a URL leading to a PDF file, like this: https://www.gla.ac.uk/media/media_452489_en.pdf
  2. Right-click the entry in the entry table.
  3. Choose "Copy linked files to folder...".
  4. Choose your home folder.
File: copyfilesdialog.fxml not found, attempting with camel case 10:16:05.694 [JavaFX Application Thread] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception occurred in Thread[JavaFX Application Thread,5,main] java.lang.IllegalStateException: Cannot load org.jabref.gui.copyfiles.copyfilesdialog at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:101) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?] at com.airhacks.afterburner.views.FXMLView.initializeFXMLLoader(FXMLView.java:125) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?] at com.airhacks.afterburner.views.FXMLView.getView(FXMLView.java:137) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?] at org.jabref.gui.AbstractView.getView(AbstractView.java:28) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?] at org.jabref.gui.copyfiles.CopyFilesDialogView.show(CopyFilesDialogView.java:25) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?] at org.jabref.gui.copyfiles.CopyFilesAction.showDialog(CopyFilesAction.java:63) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?] at org.jabref.gui.copyfiles.CopyFilesAction.lambda$startServiceAndshowProgessDialog$3(CopyFilesAction.java:58) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?] at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295) ~[jfxrt.jar:?] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161] at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294) ~[jfxrt.jar:?] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) ~[jfxrt.jar:?] at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) ~[jfxrt.jar:?] at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139) ~[jfxrt.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161] Caused by: javafx.fxml.LoadException: file:/home/erelsgl/Dropbox/papers/JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar!/org/jabref/gui/copyfiles/CopyFilesDialog.fxml
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601) ~[jfxrt.jar:?]
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2571) ~[jfxrt.jar:?]
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) ~[jfxrt.jar:?]
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) ~[jfxrt.jar:?]
at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:99) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?]
... 13 more

Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) ~[?:1.8.0_161]
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) ~[?:1.8.0_161]
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566) ~[jfxrt.jar:?]
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) ~[jfxrt.jar:?]
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) ~[jfxrt.jar:?]
at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:99) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?]
... 13 more
Caused by: java.lang.NullPointerException
at java.util.AbstractCollection.addAll(AbstractCollection.java:343) ~[?:1.8.0_161]
at javafx.collections.ModifiableObservableListBase.addAll(ModifiableObservableListBase.java:99) ~[jfxrt.jar:?]
at javafx.beans.binding.ListExpression.addAll(ListExpression.java:266) ~[jfxrt.jar:?]
at org.jabref.gui.copyfiles.CopyFilesDialogViewModel.(CopyFilesDialogViewModel.java:14) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?]
at org.jabref.gui.copyfiles.CopyFilesDialogController.initialize(CopyFilesDialogController.java:34) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) ~[?:1.8.0_161]
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) ~[?:1.8.0_161]
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566) ~[jfxrt.jar:?]
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) ~[jfxrt.jar:?]
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) ~[jfxrt.jar:?]
at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:99) ~[JabRef-4.2-dev--snapshot--2018-03-06--master--bb471a26d.jar:?]
... 13 more

@Siedlerchr
Copy link
Member

This error has probably todo with the File Annotation Tab. One line in the code needs to be adapted

@tobiasdiez tobiasdiez added bug Confirmed bugs or reports that are very likely to be bugs ui labels Mar 8, 2018
@tobiasdiez
Copy link
Member

Thank you for your report. This issue should be fixed now in the latest development version. Could you please check the build from http://builds.jabref.org/master/.

@erelsgl
Copy link
Author

erelsgl commented Mar 9, 2018

Now I do not see the exception anymore, but the file is not downloaded - I get an error dialog box saying "No content in table".

@Siedlerchr
Copy link
Member

Yes, that's right. The functionality is only for copying exiting linked physical files of an entry to an external folder.
What you want to do is in the Entry Eiditor -> general Tab -> Download from url

@tobiasdiez
Copy link
Member

@Siedlerchr Could you please update the dialog and show are more helpful message, something like "no file to copy".

@tobiasdiez tobiasdiez reopened this Mar 9, 2018
Siedlerchr added a commit that referenced this issue Mar 9, 2018
Siedlerchr added a commit that referenced this issue Mar 9, 2018
Siedlerchr added a commit that referenced this issue Mar 11, 2018
Follow up from #3818
# Conflicts:
#	src/main/java/org/jabref/gui/actions/CopyFilesAction.java
#	src/main/resources/l10n/JabRef_en.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs ui
Projects
None yet
Development

No branches or pull requests

3 participants