question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve DOI import failure dialog. Do not show exception in the gui

See original GitHub issue

JabRef version

5.6 (latest release)

Operating system

Windows

Details on version and operating system

Windows 10

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. DOI in question: 10.1109/REW.2016.24
  2. Try to get bibliography data from it
  3. Lookup DOI gives 10.1109/rew.2016.039 which works

Appendix

grafik

Log File
org.jabref.logic.importer.FetcherException: No DOI data exists
	at org.jabref@5.7.19/org.jabref.logic.importer.fetcher.DoiFetcher.performSearchById(Unknown Source)
	at org.jabref@5.7.19/org.jabref.gui.mergeentries.FetchAndMergeEntry.lambda$fetchAndMerge$0(Unknown Source)
	at org.jabref@5.7.19/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
	at org.jabref@5.7.19/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
	at org.jabref.merged.module@5.7.19/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.FileNotFoundException: https://doi.org/10.1109/REW.2016.24
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
	at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
	at org.jabref@5.7.19/org.jabref.logic.net.URLDownload.asString(Unknown Source)
	at org.jabref@5.7.19/org.jabref.logic.net.URLDownload.asString(Unknown Source)
	... 11 more
Caused by: java.io.FileNotFoundException: https://doi.org/10.1109/REW.2016.24
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at java.base/java.net.HttpURLConnection.getResponseCode(Unknown Source)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
	at org.jabref@5.7.19/org.jabref.logic.net.URLDownload.openConnection(Unknown Source)
	... 13 more

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
Siedlerchrcommented, May 8, 2022

@zkl-ai Yes, the Accept Header says: I want to get content in this format. Ideally, the server responds in this format. The problem is that the UrlDownload.asString just gets whatever the serer provides. It does not check the statusCode or the content-type of the returned response. So you need to modify that part to check for stauts code 404

1reaction
zkl-aicommented, May 4, 2022

Hello, could you assign this to me? I think this issue is quite interesting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem handling an exception in GUI - java - Stack Overflow
1 Answer 1 ... catch (NumberFormatException nfe){ JOptionPane.showMessageDialog(this, "Numerical entry expected. Please try again");. Also, note ...
Read more >
How to create a Tkinter error message box? - Tutorialspoint
We can use messagebox module in Tkinter to create various popup dialog boxes. The messagebox property has different types of built-in popup ...
Read more >
Dialogs - Android Developers
A dialog is a small window that prompts the user to make a decision or enter additional information. A dialog does not fill...
Read more >
General debugging options - Visual Studio - Microsoft Learn
Show disassembly if source is not available: Automatically shows the Disassembly window when you debug code for which the source is unavailable.
Read more >
Global Error Handling in Angular - Philipp Kief
Again, it is better to handle these errors in a centralized location so that the ... The third button shows a successful request,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found