JohnSatriano / jwktl

Automatically exported from code.google.com/p/jwktl
0 stars 0 forks source link

Parsing nullpointerexception in stream.close() #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.public static void main(String[] args) throws Exception {
    File dumpFile = new File(PATH_TO_DUMP_FILE);
    File outputDirectory = new File(TARGET_DIRECTORY);
    boolean overwriteExisting = OVERWRITE_EXISTING_FILES;

    JWKTL.parseWiktionaryDump(dumpFile, outputDirectory, overwriteExisting);

2. Using the latest file enwiktionary_20140908_pages_articles.xml
and enwiktionary_20140415_pages_articles occurs the same exception.

What is the expected output? What do you see instead?

Info: Parsed 4025411 pages
Exception in thread "main" java.lang.NullPointerException
    at de.tudarmstadt.ukp.jwktl.JWKTL.getVersion(JWKTL.java:60)
    at de.tudarmstadt.ukp.jwktl.parser.WritableBerkeleyDBWiktionaryEdition.saveProperties(WritableBerkeleyDBWiktionaryEdition.java:160)
    at de.tudarmstadt.ukp.jwktl.parser.WiktionaryArticleParser.onClose(WiktionaryArticleParser.java:115)
    at de.tudarmstadt.ukp.jwktl.parser.WiktionaryDumpParser.onClose(WiktionaryDumpParser.java:102)
    at de.tudarmstadt.ukp.jwktl.parser.WiktionaryDumpParser.parse(WiktionaryDumpParser.java:75)
    at de.tudarmstadt.ukp.jwktl.JWKTL.parseWiktionaryDump(JWKTL.java:151)
    at de.tudarmstadt.ukp.jwktl.JWKTL.parseWiktionaryDump(JWKTL.java:125)
    at de.tudarmstadt.ukp.jwktl.examples.Example1_ParseWiktionaryDump.main(Example1_ParseWiktionaryDump.java:52)

=> stream.close() -> stream is null lead to JWKTL.getVersion() has 
nullpointerexception 

What version of the product are you using? On what operating system?

jwktl 1.0.0 
OS:WIN8

Please provide any additional information below.

There are 4038950 pages in the latest file, but in the 4025411 file
always occurs NullPointerException. 

Original issue reported on code.google.com by ss61...@gmail.com on 16 Sep 2014 at 2:14

GoogleCodeExporter commented 9 years ago
Parsing the English Wiktionary dump from 2014-09-08 works on my machine using 
the just freshly released jwktl-1.0.1. Please try again using this version.

Original comment by chmeyer.de on 30 Sep 2014 at 12:28