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

Uncaught exception occured in Thread. Illegal character [?] in URL imported from Citavi. #7882

Closed
1 task done
ThiloteE opened this issue Jul 4, 2021 · 10 comments · Fixed by #7948
Closed
1 task done
Labels
bug Confirmed bugs or reports that are very likely to be bugs external files good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@ThiloteE
Copy link
Member

ThiloteE commented Jul 4, 2021

JabRef version 5.3--2021-07-02--eed637a on Windows 10 10.0 amd64; Java 16.0.1

20210704 Fragezeichen Error

Steps to reproduce the behavior:

  1. import .bib file originating from citavi
  2. imported file has to have a URL that contains a "?"
  3. Error
Log File
java.nio.file.InvalidPathException: Illegal character [?] in path at index 23: //books.google.de/books?hl=de&lr=&id=Tj0mBgAAQBAJ&oi=fnd&pg=PA115&ots=_gWwXjRTk8&sig=Tlbx9LR6LeFPor8PluqWGWdhRsI#v=onepage&q&f=false
  at java.base/sun.nio.fs.WindowsPathParser.nextSlash(Unknown Source)
  at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
  at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source)
  at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source)
  at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
  at java.base/java.nio.file.Path.resolve(Unknown Source)
  at [email protected]/org.jabref.model.util.FileHelper.find(Unknown Source)
  at [email protected]/org.jabref.model.util.FileHelper.lambda$find$0(Unknown Source)
  at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
  at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source)
  at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
  at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(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.FindOps$FindOp.evaluateSequential(Unknown Source)
  at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
  at java.base/java.util.stream.ReferencePipeline.findFirst(Unknown Source)
  at [email protected]/org.jabref.model.util.FileHelper.find(Unknown Source)
  at [email protected]/org.jabref.model.util.FileHelper.find(Unknown Source)
  at [email protected]/org.jabref.gui.actions.ActionHelper.lambda$isFilePresentForSelectedEntry$5(Unknown Source)
  at java.base/java.util.Optional.map(Unknown Source)
  at [email protected]/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$1.computeValue(Unknown Source)
  at [email protected]/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$1.computeValue(Unknown Source)
  at [email protected]/javafx.beans.binding.ObjectBinding.get(Unknown Source)
  at [email protected]/javafx.beans.binding.ObjectExpression.getValue(Unknown Source)
  at [email protected]/com.tobiasdiez.easybind.optional.PreboundOptionalBinding$3.computeValue(Unknown Source)
  at [email protected]/javafx.beans.binding.ObjectBinding.get(Unknown Source)
  at [email protected]/javafx.beans.binding.ObjectExpression.getValue(Unknown Source)
  at [email protected]/javafx.beans.binding.BooleanExpression$2.computeValue(Unknown Source)
  at [email protected]/javafx.beans.binding.BooleanBinding.get(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.get(Unknown Source)
  at [email protected]/javafx.beans.property.ReadOnlyBooleanWrapper$ReadOnlyPropertyImpl.get(Unknown Source)
  at [email protected]/javafx.beans.binding.Bindings$52.computeValue(Unknown Source)
  at [email protected]/javafx.beans.binding.BooleanBinding.get(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.get(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.get(Unknown Source)
  at [email protected]/javafx.beans.binding.BooleanExpression.getValue(Unknown Source)
  at [email protected]/javafx.beans.binding.BooleanExpression.getValue(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.binding.BooleanBinding.invalidate(Unknown Source)
  at [email protected]/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
  at [email protected]/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.binding.BooleanBinding.invalidate(Unknown Source)
  at [email protected]/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.beans.binding.ObjectBinding.invalidate(Unknown Source)
  at [email protected]/com.sun.javafx.binding.BindingHelperObserver.invalidated(Unknown Source)
  at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
  at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
  at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
  at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
  at [email protected]/javafx.collections.ModifiableObservableListBase.setAll(Unknown Source)
  at [email protected]/org.jabref.gui.StateManager.setSelectedEntries(Unknown Source)
  at [email protected]/org.jabref.gui.LibraryTab.lambda$createMainTable$14(Unknown Source)
  at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
  at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
  at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
  at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
  at [email protected]/com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.lambda$new$0(Unknown Source)
  at [email protected]/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
  at [email protected]/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(Unknown Source)
  at [email protected]/javafx.collections.ObservableListBase.fireChange(Unknown Source)
  at [email protected]/javafx.collections.ListChangeBuilder.commit(Unknown Source)
  at [email protected]/javafx.collections.ListChangeBuilder.endChange(Unknown Source)
  at [email protected]/javafx.collections.ObservableListBase.endChange(Unknown Source)
  at [email protected]/com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList._endChange(Unknown Source)
  at [email protected]/javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList._endChange(Unknown Source)
  at [email protected]/javafx.scene.control.ControlUtils.updateSelectedIndices(Unknown Source)
  at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.fireCustomSelectedCellsListChangeEvent(Unknown Source)
  at [email protected]/javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearAndSelect(Unknown Source)
  at [email protected]/javafx.scene.control.TableView$TableViewSelectionModel.clearAndSelect(Unknown Source)
  at [email protected]/com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.selectCell(Unknown Source)
  at [email protected]/com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.selectPreviousRow(Unknown Source)
  at [email protected]/com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.lambda$new$10(Unknown Source)
  at [email protected]/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
  at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
  at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
  at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
  at [email protected]/javafx.scene.Scene$KeyHandler.process(Unknown Source)
  at [email protected]/javafx.scene.Scene.processKeyEvent(Unknown Source)
  at [email protected]/javafx.scene.Scene$ScenePeerListener.keyEvent(Unknown Source)
  at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
  at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(Unknown Source)
  at java.base/java.security.AccessController.doPrivileged(Unknown Source)
  at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(Unknown Source)
  at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
  at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(Unknown Source)
  at [email protected]/com.sun.glass.ui.View.handleKeyEvent(Unknown Source)
  at [email protected]/com.sun.glass.ui.View.notifyKey(Unknown Source)
  at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
  at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
  at java.base/java.lang.Thread.run(Unknown Source)

@Siedlerchr
Copy link
Member

Can you please check if the citavi export has the url listed with the prefix http or http:// ?
//books.google.de/books?hl=
From the error message it seems the prefix is missing and therefore JabRef does not recognize this as an url and tries to parse it as a local file path

@Siedlerchr Siedlerchr added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Jul 5, 2021
@ThiloteE
Copy link
Member Author

ThiloteE commented Jul 5, 2021

This is the BibTex source that caused the error; You can see it is https instead of http or http://

@incollection{Sturm.2004,
author = {Sturm, Roland},
title = {Staatst{"a}tigkeit im europ{"a}ischen Mehrebenensystem - Der Beitrag der Policy-Forschung zur Analyse von EU-governance-Prozessen},
urldate = {20.12.2020},
pages = {117--132},
publisher = {{VS Verlag f{"u}r Sozialwissenschaften}},
isbn = {978-3-8100-4034-3},
editor = {Holtmann, Everhard},
booktitle = {Staatsentwicklung und Policyforschung},
year = {2004},
address = {Wiesbaden},
doi = {10.1007/978-3-322-80971-1{\textunderscore }10},
file = {https://books.google.de/books?hl=de&lr=&id=Tj0mBgAAQBAJ&oi=fnd&pg=PA115&ots=_gWwXjRTk8&sig=Tlbx9LR6LeFPor8PluqWGWdhRsI#v=onepage&q&f=false}
}

Here you can see the entry in citavi:

20210704 Fragezeichen Error - Citavi entry

Don't worry, in Citavi, there also is a https:// in front, it just doesn't show in the UI outside of the edit entry field.

@Siedlerchr
Copy link
Member

Thanks, indeed, I can reproduce this partly. It is incorrectly assumed to be a file

@Siedlerchr Siedlerchr added external files bug Confirmed bugs or reports that are very likely to be bugs and removed status: waiting-for-feedback The submitter or other users need to provide more information about the issue labels Jul 5, 2021
@Siedlerchr
Copy link
Member

The problem is that the file field is in incorrect format. The file field parser splits it somehow into https+ the rest of the url

@ThiloteE
Copy link
Member Author

Thank you. I understand now. I will change the "file" to "url", which should do the trick.

On first glance solutions to workaround:

  • Code into JabRef to detect links in files
  • Citavi has to change how they export bib files.

I don't think i can do more here. Good luck and thank you :-)

@ThiloteE
Copy link
Member Author

Just saying, when i enter the URL in Citavi, it doesn't stick to the URL field, but the URL immediately "turns" into a "local web file". It is the one in the bottom red rectangle.

@Siedlerchr
Copy link
Member

Ah thanks for the clarification. Im thinking of a search and replace Regex

@Siedlerchr Siedlerchr added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Jul 30, 2021
Siedlerchr added a commit that referenced this issue Jul 31, 2021
* Fix file field parser not recognizing online urls

Fixes #7882

* checkstyle

* fix test
@Siedlerchr
Copy link
Member

Siedlerchr commented Jul 31, 2021

@ThiloteE JabRef should now be able to parse the file field correctly, I added a fix.

The new version is currently building, will take roughly 20 minutes
We would like to ask you to use a development build from https://builds.jabref.org/main and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

@ThiloteE
Copy link
Member Author

works like a charm via

JabRef 5.4--2021-07-31--720fd8e
Windows 10 10.0 amd64
Java 16.0.1
JavaFX 16+8

good job! :)

for everybody that stumbles upon this thread in future:
the solution looks like this:

image

@koppor
Copy link
Member

koppor commented Aug 2, 2021

Refs #98

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 external files good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants