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

DOI fetcher seems not to work anymore because of JabRef using deprecated Crossref API #5767

Closed
ytzemih opened this issue Dec 19, 2019 · 2 comments

Comments

@ytzemih
Copy link

ytzemih commented Dec 19, 2019

Using the "Look up DOI" does not work for me anymore.

I am getting the following exception:

org.jabref.logic.importer.FetcherException: An I/O exception occurred
at org.jabref.logic.importer.IdParserFetcher.findIdentifier(IdParserFetcher.java:93)
at org.jabref.gui.fieldeditors.IdentifierEditorViewModel.lambda$lookupIdentifier$3(IdentifierEditorViewModel.java:96)
at org.jabref.gui.util.BackgroundTask$1.call(BackgroundTask.java:39)
at org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:98)
at javafx.concurrent.Task$TaskCallable.call(Task.java:1423)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://api.crossref.org/works?query.title=Safety+analysis+using+Petri+nets&query.author=Leveson%2C+N.+G.+and+Stolzy%2C+J.+L.&filter=from-pub-date%3A2006&rows=20&offset=0
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
at java.net.URL.openStream(URL.java:1045)
at org.jabref.logic.importer.IdParserFetcher.findIdentifier(IdParserFetcher.java:74)
... 10 more

The important part is the line:

Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://api.crossref.org/works?query.title=Safety+analysis+using+Petri+nets&query.author=Leveson%2C+N.+G.+and+Stolzy%2C+J.+L.&filter=from-pub-date%3A2006&rows=20&offset=0

Copying it to the browser returns:

crossref-api-change

This clearly tells me that this is a bug due to crossref API deprecation and could probably be fixed by just changing from using the parameter query.title to using query.bibliographic.

I am using

JabRef 4.3.1
Linux 4.15.0-70-generic amd64
Java 1.8.0_201

and am reporting that problem since I have had it for a couple of months already.

Thanks for taking a look at it.

@Siedlerchr
Copy link
Member

Duplicate of #5485
This issue has been resolved in the 5.0.0 beta:
https://www.fosshub.com/JabRef-old.html
You can download it from the link above.
Please remember to make a backup of your library before trying out the new version.

@ytzemih
Copy link
Author

ytzemih commented Dec 19, 2019

Thanks a lot, will try 5.0! And, sorry, my quick-check for duplicates was apparently not accurate enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants