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

Trouble importing after upgrading to Jabref 3.0 #479

Closed
mazeratti opened this issue Dec 7, 2015 · 28 comments
Closed

Trouble importing after upgrading to Jabref 3.0 #479

mazeratti opened this issue Dec 7, 2015 · 28 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs
Milestone

Comments

@mazeratti
Copy link

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

@matthiasgeiger
Copy link
Member

Hi,
can you please paste the complete Stacktrace hier?

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

Thanks!

@mazeratti
Copy link
Author

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=

@matthiasgeiger
Copy link
Member

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.

@mazeratti
Copy link
Author

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

@oscargus
Copy link
Contributor

oscargus commented Dec 7, 2015

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.

@mazeratti
Copy link
Author

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

@ukleine
Copy link

ukleine commented Dec 7, 2015

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!!

@koppor
Copy link
Member

koppor commented Dec 7, 2015

@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? 😇

@ukleine
Copy link

ukleine commented Dec 7, 2015

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.

@mazeratti
Copy link
Author

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.

@koppor
Copy link
Member

koppor commented Dec 8, 2015

@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?

@ukleine
Copy link

ukleine commented Dec 8, 2015

@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?

@koppor
Copy link
Member

koppor commented Dec 8, 2015

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.

@ukleine
Copy link

ukleine commented Dec 8, 2015

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!!

@tobiasdiez
Copy link
Member

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();
                }

@ukleine
Copy link

ukleine commented Dec 8, 2015

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.

@matthiasgeiger matthiasgeiger added this to the v3.1 milestone Dec 8, 2015
@matthiasgeiger matthiasgeiger added the bug Confirmed bugs or reports that are very likely to be bugs label Dec 8, 2015
@mazeratti
Copy link
Author

@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

@ukleine
Copy link

ukleine commented Dec 9, 2015

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!!!

@mazeratti
Copy link
Author

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.

@matthiasgeiger
Copy link
Member

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...

@mazeratti
Copy link
Author

Thanks for the info Matthias. I had already tried that link. jabref file downloads but when I try to install it I am getting the error message that the file is damaged. Is there any other source from where I could download it ? I tried a couple of them, but almost all of them points to the newer version jabref V 3.0.

screen shot 2015-12-09 at 10 11 22 pm

@koppor
Copy link
Member

koppor commented Dec 9, 2015

@mazeratti Could you please check our Mac OS X FAQ? Does it help?

Possibly 2.11 beta 3 might also still run on Mac OS X: https://sourceforge.net/projects/jabref/files/jabref/2.11%20beta%203/. It should be fine to use. Only the "special fields" functionality is broken there.

@mazeratti
Copy link
Author

@koppor Thanks a lot!!. that worked.

JabRef-2.11b3-OSX.zip did not work but JabRef-2.11b3-OSX-Java6.zip worked.Import function works without any problem now 😊

Jabref 2.10 worked after disabling the firewall. Normally when the firewall blocks, the message says you cannot open it from an unidentified developer but when you right click and open, it works. That wasn't the case here, so I thought it had something to do with the file itself. Sorry for not checking up the FAQ, I was not aware that the firewall caused it.

Once again thanks for the help you all extended. Hope the bug in V 3.0 will be fixed in the next update.

Between, I also did not know that I can support jabref by ordering books from amazon via the link provided. Is there a more detailed info about the same ? If i click the link, it opens up a few selected books. Is the supported limited to those books only ? or can I order a book of my choice via the link.

@koppor
Copy link
Member

koppor commented Dec 9, 2015

@mazeratti You can order anything you like. The important thing only is to start from the link. I'll update the text accordingly the next days.

@koppor
Copy link
Member

koppor commented Dec 16, 2015

I think, this is solved via boceckts@b773a12. I don't know, why it worked earlier. The isRecognizedFormat reads from an InputStream and the real importer uses the same InputStream. This was fixed by using a BufferedInputStream, which is reset to the start after calling isRecognizedFormat.

@ukleine
Copy link

ukleine commented Dec 21, 2015

Yes, #531 fixes the issue of "importing not functioning". Thanks!!

BTW, I would still be happy if my above enhancement suggestions would be considered :-)
(proper key automatically generated & after closing of import window moving to or selecting imported entries)

@mazeratti
Copy link
Author

@koppor Thanks for the fix 😊 It works now

@koppor koppor closed this as completed Dec 21, 2015
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
Projects
None yet
Development

No branches or pull requests

6 participants