Open starsareintherose opened 2 years ago
Would it be possible for you to upload one or a few of the pdf-files that make problems? So far i cannot reproduce this on my Windows System.
sorry, this is performed on ArchLinux instead of Windows
I know, but since it has to do with XMP-metadata, i want to check if and what metadata is attached to the files and if i also get the same problem if i use your PDFs. After this we could exclude that the problem is caused by the specific characteristics of the pdf file.
jbi.14.zip try this
I indeed cannot reproduce on Windows. No error.
When i imported XMP-Metadata manually via the import dialogue, the only data that Jabref fetched was the DOI:
@Misc{,
doi = {doi:10.1111/jbi.14107},
}
I checked one entry with exiftool and found no XMP-metadata attached:
File Type : PDF
File Type Extension : pdf
MIME Type : application/pdf
PDF Version : 1.6
Linearized : No
Creator : Adobe InDesign 15.1 (Windows)
Modify Date : 2021:06:09 01:44:29-07:00
Create Date : 2021:05:18 20:23:58+05:30
Producer : Adobe PDF Library 15.0; modified using iText 4.2.0 by 1T3XT
Subject : Journal of Biogeography 0.0:null-null
WPS-PROCLEVEL : 3
WPS-JOURNALDOI : 10.1111/(ISSN)1365-2699
Title : Spatial phylogenomics of acrobat ants in MadagascarÔÇöMountains function as cradles for recent diversity and endemism
WPS-ARTICLEDOI : 10.1111/jbi.14107
Page Mode : UseThumbs
Format : application/pdf
Identifier : doi:10.1111/jbi.14107
Digital Object Identifier : 10.1111/jbi.14107
URL : https://doi.org/10.1111/jbi.14107
Major Version Date : 2021-05-16
Crossmark Domain Exclusive : true
Cross Mark Domains : onlinelibrary.wiley.com
Doi : 10.1111/jbi.14107
Crossmark Major Version Date : 2021-05-16
Language : en-US
Page Count : 14
May this be of help to the one(s) that looks at the code.
Hey, could you please try the newest development version of Jabref? There has been at least one more fix for import of PDFs. Maybe it works now? You can find the development version here: https://builds.jabref.org/main/
java.lang.NullPointerException: Cannot read field "dragboard" because "this.this$0.dndGesture" is null
at org.jabref.merged.module@5.6.144/javafx.scene.Scene$DropTargetListener.drop(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.lambda$handleDragDrop$2(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragDrop(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleDragDrop$11(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragDrop(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.glass.ui.View.handleDragDrop(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.glass.ui.View.notifyDragDrop(Unknown Source)
at org.jabref.merged.module@5.6.144/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at org.jabref.merged.module@5.6.144/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Not all can be import
This may be related to #7072
At least for mac there seems to be PR from the openjfx team now https://github.com/openjdk/jfx/pull/1089 Maybe for linux it's already working? Please try someone the latest dev version
Negative, cannot confirm that it works on my machine with the following "About JabRef" output:
JabRef 5.10--2023-04-16--d47ed31
Linux 5.19.0-38-generic amd64
Java 19.0.2
JavaFX 20+19
Still getting the same Cannot read file "dragboard" because "this.this$0.dndGesture" is null
error.
``` java.lang.NullPointerException: Cannot read field "dragboard" because "this.this$0.dndGesture" is null at org.jabref.merged.module@5.10.544/javafx.scene.Scene$DropTargetListener.drop(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.lambda$handleDragDrop$2(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragDrop(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleDragDrop$11(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragDrop(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.glass.ui.View.handleDragDrop(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.glass.ui.View.notifyDragDrop(Unknown Source) at org.jabref.merged.module@5.10.544/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at org.jabref.merged.module@5.10.544/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ```
this is an javafx exception thing
Can an MWE created and a bug filed?
I have checked all files that were posted in this thread and i can drag and drop them successfully into JabRef, if I drag and drop them one by one. Entries are created with nice metadata.
JabRef 5.10--2023-04-10--e7f55d9
Windows 10 10.0 amd64
Java 19.0.2
JavaFX 20+19
There are two separate issues:
[ ] (Depends on external) drag and drop multiple files
This issue currently only emerges when multiple files are dragged and dropped. This might potentially get fixed by javafx version 21. See https://github.com/JabRef/jabref/issues/7072. Right now JabRef development version is using version jfx 20, so let's wait and see.
[x] (No need to fix) no metadata attached.
I have already confirmed that metadata IS attached to these files and they are not read or write protected.
Thorough explanation: If there is no metadata attached to the pdf file, then JabRef will correctly create no entry, as metadata is necessary to create the entry. This problem usually surfaces, if the file is read or write protected, so no metadata can be written to the file or no metadata can be read from the file. It also surfaces, when the creator of the pdf file failed to attach metadata. If the file is not read protected, JabRef can try to extract metadata via its Grobid instance (can be configured via Preferences > Import and Export > Remote services), but this service is imperfect and will not always be accurate. Correct XMP metadata from the original author would be prefered.
For me, the issue presents itself when dragging a single PDF or multiple PDFs into JabRef--either dropping them onto an existing entry i.e., linking as file, or when dropping them as "import from metadata'. In any case, dragging PDF files onto JabRef throws the exception, and for what it's worth, it is related to #7072.
After checking on macOS just now with JabRef 5.10--2023-04-18--dab8516, I am no longer getting the exception thrown there. I will try later on ubuntu to see if it works with the more recent development version (tried it before with JabRef 5.10--2023-04-16--d47ed31)
JabRef version
5.4 (latest release)
Operating system
GNU / Linux
Details on version and operating system
ArchLinux
Checked with the latest development build
Steps to reproduce the behaviour
Appendix
...
Log File
``` 2021-12-22 15:54:35 [pool-2-thread-4] org.jabref.logic.xmp.XmpUtilReader.getXmpMetadata() ERROR: Problem parsing XMP schema. Continuing with other schemas.: java.io.IOException: org.apache.xmpbox.xml.XmpParsingException: Cannot find a definition for the namespace http://prismstandard.org/namespaces/basic/3.0/ at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilShared.parseXmpMetadata(XmpUtilShared.java:34) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilReader.getXmpMetadata(XmpUtilReader.java:142) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilReader.readXmp(XmpUtilReader.java:74) at org.jabref@5.4/org.jabref.logic.importer.fileformat.PdfXmpImporter.importDatabase(PdfXmpImporter.java:58) at org.jabref@5.4/org.jabref.logic.importer.fileformat.PdfMergeMetadataImporter.importDatabase(PdfMergeMetadataImporter.java:81) at org.jabref@5.4/org.jabref.logic.externalfiles.ExternalFilesContentImporter.importPDFContent(ExternalFilesContentImporter.java:29) at org.jabref@5.4/org.jabref.gui.externalfiles.ImportHandler$1.call(ImportHandler.java:95) at org.jabref@5.4/org.jabref.gui.externalfiles.ImportHandler$1.call(ImportHandler.java:72) at org.jabref@5.4/org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:162) at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1426) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: org.apache.xmpbox.xml.XmpParsingException: Cannot find a definition for the namespace http://prismstandard.org/namespaces/basic/3.0/ at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.checkPropertyDefinition(DomXmpParser.java:891) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parseChildrenAsProperties(DomXmpParser.java:297) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:241) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:205) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilShared.parseXmpMetadata(XmpUtilShared.java:31) ... 15 more 2021-12-22 15:54:35 [pool-2-thread-4] org.jabref.logic.xmp.XmpUtilReader.getXmpMetadata() ERROR: Problem parsing XMP schema. Continuing with other schemas.: java.io.IOException: org.apache.xmpbox.xml.XmpParsingException: Cannot find a definition for the namespace http://crossref.org/crossmark/1.0/ at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilShared.parseXmpMetadata(XmpUtilShared.java:34) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilReader.getXmpMetadata(XmpUtilReader.java:142) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilReader.readXmp(XmpUtilReader.java:74) at org.jabref@5.4/org.jabref.logic.importer.fileformat.PdfXmpImporter.importDatabase(PdfXmpImporter.java:58) at org.jabref@5.4/org.jabref.logic.importer.fileformat.PdfMergeMetadataImporter.importDatabase(PdfMergeMetadataImporter.java:81) at org.jabref@5.4/org.jabref.logic.externalfiles.ExternalFilesContentImporter.importPDFContent(ExternalFilesContentImporter.java:29) at org.jabref@5.4/org.jabref.gui.externalfiles.ImportHandler$1.call(ImportHandler.java:95) at org.jabref@5.4/org.jabref.gui.externalfiles.ImportHandler$1.call(ImportHandler.java:72) at org.jabref@5.4/org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:162) at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1426) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: org.apache.xmpbox.xml.XmpParsingException: Cannot find a definition for the namespace http://crossref.org/crossmark/1.0/ at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.checkPropertyDefinition(DomXmpParser.java:891) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parseChildrenAsProperties(DomXmpParser.java:297) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:241) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:205) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilShared.parseXmpMetadata(XmpUtilShared.java:31) ... 15 more 2021-12-22 15:54:35 [pool-2-thread-4] org.jabref.logic.xmp.XmpUtilReader.getXmpMetadata() ERROR: Problem parsing XMP schema. Continuing with other schemas.: java.io.IOException: org.apache.xmpbox.xml.XmpParsingException: Cannot find a definition for the namespace http://www.niso.org/schemas/jav/1.0/ at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilShared.parseXmpMetadata(XmpUtilShared.java:34) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilReader.getXmpMetadata(XmpUtilReader.java:142) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilReader.readXmp(XmpUtilReader.java:74) at org.jabref@5.4/org.jabref.logic.importer.fileformat.PdfXmpImporter.importDatabase(PdfXmpImporter.java:58) at org.jabref@5.4/org.jabref.logic.importer.fileformat.PdfMergeMetadataImporter.importDatabase(PdfMergeMetadataImporter.java:81) at org.jabref@5.4/org.jabref.logic.externalfiles.ExternalFilesContentImporter.importPDFContent(ExternalFilesContentImporter.java:29) at org.jabref@5.4/org.jabref.gui.externalfiles.ImportHandler$1.call(ImportHandler.java:95) at org.jabref@5.4/org.jabref.gui.externalfiles.ImportHandler$1.call(ImportHandler.java:72) at org.jabref@5.4/org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:162) at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1426) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: org.apache.xmpbox.xml.XmpParsingException: Cannot find a definition for the namespace http://www.niso.org/schemas/jav/1.0/ at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.checkPropertyDefinition(DomXmpParser.java:891) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parseChildrenAsProperties(DomXmpParser.java:297) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:241) at org.apache.xmpbox@2.0.24/org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:205) at org.jabref@5.4/org.jabref.logic.xmp.XmpUtilShared.parseXmpMetadata(XmpUtilShared.java:31) ... 15 more ```