jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Trouble importing after upgrading to Jabref 3.0

Open mazeratti opened this issue 10 years ago • 28 comments

Hi, After the upgrade, I can only import .bib files. no other formats e.g. .ris, works. I am using jabref on OS X El Capitan (10.11.1). I got this error while installing: an error occurred java.lang.nullpointerexception

mazeratti avatar Dec 07 '15 12:12 mazeratti

Hi, can you please paste the complete Stacktrace hier?

Either from the terminal or from the error console (Help -> Show error console).

Thanks!

matthiasgeiger avatar Dec 07 '15 12:12 matthiasgeiger

user.language=en java.specification.vendor=Oracle Corporation awt.toolkit=sun.lwawt.macosx.LWCToolkit java.vm.info=mixed mode java.version=1.8.0_25 java.ext.dirs=/Users/mazeratti/Library/Java/Extensions:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java sun.boot.class.path=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/resources.jar:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/rt.jar:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/sunrsasign.jar:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jsse.jar:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jce.jar:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/charsets.jar:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jfr.jar:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/classes install4j.appDir=/Volumes/jabref/JabRef Installer.app/Contents/Resources/app/ java.vendor=Oracle Corporation file.separator=/ java.vendor.url.bug=http://bugreport.sun.com/bugreport/ sun.font.fontmanager=sun.font.CFontManager sun.io.unicode.encoding=UnicodeBig sun.cpu.endian=little install4j.systemLanguage=en socksNonProxyHosts=local|.local|169.254/16|.169.254/16 ftp.nonProxyHosts=local|.local|169.254/16|.169.254/16 sun.cpu.isalist=

mazeratti avatar Dec 07 '15 12:12 mazeratti

Thanks, for this information - but we need the complete call hierarchy which led to the "NullPointerException" you mentioned before (this is called stacktrace) to investigate the issue. You should find this in the Error console.

matthiasgeiger avatar Dec 07 '15 12:12 matthiasgeiger

Hi Matthias,

Thanks for the quick response. I tried to check the help --> show error console in jabref. Its showing a blank "output" tab. Its the same with "exceptions". I have attached a screenshot.

Also please find attached the log file generated during installation. Since I couldn't attach a file name with .log extension, i changed it to .txt

Thanks a lot for your help

output

install4jError1859136998290894327.txt

mazeratti avatar Dec 07 '15 13:12 mazeratti

Oh, look at the exceptions tab instead. The output tab should really be removed as we try to get rid of all printouts there and rely on logging and exceptions.

oscargus avatar Dec 07 '15 13:12 oscargus

Please find below a screenshot of exceptions tab and the log tab exceptions log

mazeratti avatar Dec 07 '15 13:12 mazeratti

Hi,

First of all, many thanks for all the great work you put into the new version! Looks awful and has some nice new features!

Working on OpenSuse 13.1 I can confirm the above problem. Actually, I cannot import any files like *.bib or *.ris using Crtl-I. I get the error message "No entries found. Please make sure you are using the correct import filter." No output in the error console. To be sure, I did import exactly the same files with Jabref 2.11 a minute ago. Actually, when I remember correctly, in pre-2.11 versions one did not even have to select the proper file type (RIS, BIBTEX etc) which became necessary at least with 2.11.

Thanks!!

ukleine avatar Dec 07 '15 16:12 ukleine

@tobiasdiez Could it be that we changed the behavior isRecognizedFormat from 2.x to 3.0?

@PUKK Why aren't you opening BibTeX files with the normal File-Open-Functionality? :innocent:

koppor avatar Dec 07 '15 18:12 koppor

I want to include a reference into an existing database. Actually, using File-open with the same *.bib file works but opens a new database. That's not what "Import into current database" is supposed to do, isn't it?

In addition, in my standard workflow I do use a one-line script called from within Firefox. The one-line script reads

java -jar ~/bin/JabRef.jar --importToOpen $(readlink -f $1)

This worked flawlessly with Jabref 2.11 but not with 3.0. Nothing happens when calling this using Jabref 3.0. Maybe the two problems are connected.

ukleine avatar Dec 07 '15 19:12 ukleine

as PUKK pointed out everything was fine until i upgraded to 3.0. I am in the middle of writing my phd thesis and jabref is my main reference manager. So I hope someone will be able to resolve it asap.

mazeratti avatar Dec 07 '15 22:12 mazeratti

@PUKK @mazeratti Please double check that you have "Listen for remote operation on port: 6050" enabled. (Preferences/Advanced). Regarding "asap", @mazeratti did you check our backing page?

koppor avatar Dec 08 '15 07:12 koppor

@koppor Yes, "Listen for remote operation on port: 6050" was enabled in my tests. Is there any debugging option or similar, so that I can help nailing down the problem?

ukleine avatar Dec 08 '15 07:12 ukleine

In "Help/Error Console". What is said in the tab "Output" and "Exceptions"? Maybe restart JabRef to have the output cleaned. Further, what is the output of the script calling --importToOpen?

On my quick experiments (on Windows 8.1), the import dialog was hidden somewhere behind. I could get it working when JabRef was shown next to the browser window.

koppor avatar Dec 08 '15 08:12 koppor

The "Output" indeed shows (I overlooked before that I need to close and reopen the error console to get an update): Importing in unknown format: /tmp/achs_jpcbfk119_14971.ris Could not find a suitable import format. Importing in unknown format: /tmp/achs_jpcbfk119_14971.bib Format used: BibTeX

And yes, I might have been wrong and not seen the hidden import dialog (which was up front in 2.11). So indeed the BibTeX import seems to work as originally reported by @mazeratti (sorry for the confusion on my side). Still RIS (and probably other formats) have a problem.

Thanks for the quick feedback!!

ukleine avatar Dec 08 '15 08:12 ukleine

Could you please try the following: Open the import dialog, chooser your file and (this is important!) also select the importer from the drop-down below (titled "Files of type"). After this the format should be recognized.

@developers: The reason is that the ImportFormat is not recognized based on the file path. That is, in the following lines the format is initialized with null because ff is not an ImportFileFilter but a BasicFileFilter.

// net.sf.jabref.importer.ImportFormats
                FileFilter ff = fc.getFileFilter();
                ImportFormat format = null;
                if (ff instanceof ImportFileFilter) {
                    format = ((ImportFileFilter) ff).getImportFormat();
                }

tobiasdiez avatar Dec 08 '15 09:12 tobiasdiez

For my tests I use, for example, inputs from the American Chemical Society. Here an example so that you maybe can better reproduce my issue http://pubs.acs.org/action/showCitFormats?doi=10.1021%2Facs.jpcb.5b08970

Now using "File ->Import into Current Database" I cannot import neither the BIB nor the RIS files from the above link. As stated in my original post, I get the error message "No entries found. Please make sure you are using the correct import filter." And yes, I did select the proper format

Using --importToOpen the error console statements are given in my previous post and only the BIB gets imported.

ukleine avatar Dec 08 '15 09:12 ukleine

@koppor Yes “listen for remote operation on port 6050” is enabled

@tobiasdiez I tried importing a .ris file by selecting RIS filter but I am receiving the error message “No entries found. Please make sure you are using the correct import filter” and as previously mentioned no messages in help -> error console -> output or exceptions

mazeratti avatar Dec 08 '15 10:12 mazeratti

While you look at fixing the import issues which did work before in 2.11, there are enhancements which would be nice to have (and were not there in 2.11):

  • When importing a single entry, a "key" should be generated automatically (is done) which actually observes the rules defined Options -> BibTex key generator -> default pattern (wrong key generated). If clicking on "Generate now" while importing, the correct key is generated.
  • After closing the import window, Jabref "should" jump to (or select) the imported entry in the main window (maybe optional). Since one cannot edit entries in the import window (or even see all fields depending on the preview), I always have to search for the newly imported entry to check if the entry is fine and often manual fine-tuning is still needed (at least I usually have to select how the journal name is abbreviated).
  • I do have still quite some problems with special characters in entries like http://pubs.acs.org/action/showCitFormats?doi=10.1021%2Facs.jpclett.5b02390 I know this is a complex issue and I see you are working on this. But anyway I wanted to provide a specific example. In my experience it sometimes helps, to be pointed at a specific problem.

Thanks for considering these issues and again thanks for all your effort and time!!!

ukleine avatar Dec 09 '15 07:12 ukleine

Hi,

Is there a way to download 2.10 dmg file ? Till the new version is released I would like to work with 2.10.

I have also noticed that V 3.0, does not remember the last folder opened. For ex. if I want to import the downloaded .ris or .bib file each time I have to show the path to the downloaded folder. The default is the folder where my jabref database is stored. For the previous versions this was not the case.

mazeratti avatar Dec 09 '15 10:12 mazeratti

The Mac Zip file for 2.10 is still available at sourceforge here: http://sourceforge.net/projects/jabref/files/jabref/2.10/JabRef-2.10-OSX.zip/download

Sorry, I still had not found the time to investigate the importing issue - hopefully in the next few days...

matthiasgeiger avatar Dec 09 '15 19:12 matthiasgeiger