\title{Wave Forces}

%% main text
With tremendous population \cite{kee1997flexible}

bibby.bib contains

    title={Flexible membrane wave barrier. {II}:~{Floating}\slash 
           submerged buoy-membrane system},
    author={Kee, S. T. and Kim, M. H.},
    journal={Journal of Waterway, Port, Coastal, and Ocean Engineering},
    publisher={American Society of Civil Engineers}

the errors shown are

Process started: bibtex.exe "texstudio_hN6136"

This is BibTeX, Version 0.99d (MiKTeX 2.9.6350 64-bit)
The top-level auxiliary file: texstudio_hN6136.aux
The style file: elsarticle-harv.bst
I couldn't open database file bibby.bib
---line 4 of file texstudio_hN6136.aux
 : \bibdata{bibby
 :               }
I'm skipping whatever remains of this command
I found no database files---while reading file texstudio_hN6136.aux
Warning--I didn't find a database entry for "kee1997flexible"
(There were 2 error messages)

Process exited with error(s)

Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode "texstudio_hN6136".tex

Process exited normally

Could someone help me where I am making mistake and Any help on properly inserting bibliography is highly appreciated.

  • 2
    Welcome to TeX.SE. Thanks for posting a very clear MWE (minimum working example). I am unable to replicate the issue you've described if the file bibby.bib is placed in the same directory as the main tex file (texstudio_hN6136.tex in the case of your example). Have you double-checkd the spelling of the bib file name, and have you checked that the file doesn't have an additional extension, say bibby.bib.txt or bibby.bib.tex? – Mico Oct 23 '17 at 5:48
  • Off-topic: The elsarticle document class loads the natbib package automatically -- no need to load natbib separately. Also, don't load packages (amssymb) more than once. – Mico Oct 23 '17 at 5:51
  • 1
    @Mico: For clarity sake I gave MWE. Thank you for the reply. It helped me. – KGV Oct 23 '17 at 5:59
  • 2
    Did you save your .tex file prior to compiling? Filenames like texstudio_hN6136 usually occur if an new file is not saved prior to compiling and texstudio will automatically save it with such a name in a temporary folder (which then of course does not have your .bib file). – user36296 Oct 23 '17 at 9:44
  • @samcarter: thank you for the suggestions. it is helpful. – KGV Oct 25 '17 at 10:19

If a new untitled .tex file is created in texstudio and not saved by the user prior to compiling, texstudio will automatically save it in a temporary location with a cryptic name such as the texstudio_hN6136 shown in your log file.

As your .bib file is not present in this temporary location, the error shown in your question will occur.

Solution: save the .tex file at a location and name of your choice before you compile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.