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

CLI: --fetch causes exception #1850

Closed
mlep opened this issue Aug 25, 2016 · 2 comments
Closed

CLI: --fetch causes exception #1850

mlep opened this issue Aug 25, 2016 · 2 comments

Comments

@mlep
Copy link
Contributor

mlep commented Aug 25, 2016

JabRef3.5 and JabRef-3.6dev--snapshot--2016-08-25--masterb73b236.jar
on Linux Mint.

Help file (although outdated --- I am in the process of updating it) states that the list of available fetchers can be printed out by typing in Jabref --fetch.

In fact, this causes an error message to be displayed (JabRef complains no option is given for this option), displays the help, and display another message.

Steps to reproduce:

  • Launch Jabref --fetch
java -jar JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar --fetch -n
11:49:27.552 [AWT-EventQueue-0] WARN  net.sf.jabref.cli.JabRefCLI - Problem parsing arguments
org.apache.commons.cli.MissingArgumentException: Missing argument for option: f
    at org.apache.commons.cli.DefaultParser.checkRequiredArgs(DefaultParser.java:211) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at org.apache.commons.cli.DefaultParser.handleOption(DefaultParser.java:599) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at org.apache.commons.cli.DefaultParser.handleShortAndLongOption(DefaultParser.java:480) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at org.apache.commons.cli.DefaultParser.handleToken(DefaultParser.java:243) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:120) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at net.sf.jabref.cli.JabRefCLI.<init>(JabRefCLI.java:32) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at net.sf.jabref.cli.ArgumentProcessor.<init>(ArgumentProcessor.java:73) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at net.sf.jabref.JabRefMain.start(JabRefMain.java:109) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at net.sf.jabref.JabRefMain.lambda$main$0(JabRefMain.java:41) ~[JabRef-3.6dev--snapshot--2016-08-25--master--b73b236.jar:?]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) [?:1.8.0_66]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) [?:1.8.0_66]
    at java.awt.EventQueue.access$500(EventQueue.java:97) [?:1.8.0_66]
    at java.awt.EventQueue$3.run(EventQueue.java:709) [?:1.8.0_66]
    at java.awt.EventQueue$3.run(EventQueue.java:703) [?:1.8.0_66]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_66]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) [?:1.8.0_66]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) [?:1.8.0_66]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_66]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_66]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_66]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_66]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_66]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_66]
usage: jabref [OPTIONS] [BIBTEX_FILE]

Options: [-a <FILE>] [-asfl] [-b] [-d <FILE>] [--debug] [-f <FILE>] [-g]
       [-h] [-i <FILE>] [--importToOpen <FILE>] [-m <FILE>] [-n] [-o
       <FILE>] [-p <FILE>] [-v] [-x <FILE>]
 -a,--aux <FILE>                     Subdatabase from AUX:
                                     file[.aux],new[.bib]
 -asfl,--automaticallySetFileLinks   Automatically set file links
 -b,--blank                          Do not open any files at startup
 -d,--prdef <FILE>                   Reset preferences (key1,key2,... or
                                     'all')
    --debug                          Show debug level messages
 -f,--fetch <FILE>                   Run fetcher, e.g.
                                     "--fetch=Medline:cancer"
 -g,--generateBibtexKeys             Regenerate all keys for the entries
                                     in a BibTeX file
 -h,--help                           Display help on command line options
 -i,--import <FILE>                  Import file: filename[,import format]
    --importToOpen <FILE>            Import to open tab
 -m,--exportMatches <FILE>           [field]searchTerm,outputFile:
                                     file[,exportFormat]
 -n,--nogui                          No GUI. Only process command line
                                     options.
 -o,--output <FILE>                  Output or export file:
                                     filename[,export format]
 -p,--primp <FILE>                   Import preferences from file
 -v,--version                        Display version
 -x,--prexp <FILE>                   Export preferences to file

Available import formats:
  BibTeX         : bibtex
  BibTeXML       : bibtexml
  Biblioscape    : biblioscape
  Copac          : cpc
  INSPEC         : inspec
  ISI            : isi
  MSBib          : msbib
  Medline        : medline
  MedlinePlain   : medlineplain
  Ovid           : ovid
  PDFcontent     : pdfcontent
  REPEC New Economic Papers (NEP) : repecnep
  RIS            : ris
  Refer/Endnote  : refer
  SilverPlatter  : silverplatter
  XMP-annotated PDF : xmp
  text citations : textcitations

Available export formats: MSBib, ProdInraRIS, bibordf, bibtexml, din1505,
docbook, endnote, harvard, html, iso690rtf, iso690txt, listrefs, misq,
mods, ods, oocalc, oocsv, ris, simplehtml, tablerefs, tablerefsabsbib

Please report issues at https://github.com/JabRef/jabref/issues
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException
    at net.sf.jabref.cli.JabRefCLI.<init>(JabRefCLI.java:38)
    at net.sf.jabref.cli.ArgumentProcessor.<init>(ArgumentProcessor.java:73)
    at net.sf.jabref.JabRefMain.start(JabRefMain.java:109)
    at net.sf.jabref.JabRefMain.lambda$main$0(JabRefMain.java:41)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
@koppor
Copy link
Member

koppor commented Sep 13, 2016

The updated help file is available at http://help.jabref.org/en/CommandLine

I think, it is currently not possible to list all fetchers, is it?

@lenhard
Copy link
Member

lenhard commented Sep 23, 2016

Further discussion regarding the help and console messages for fetch will be tracked in #2016

@lenhard lenhard closed this as completed Sep 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants