This last test from the cmd line is already with master from GitHub...

Egon

On 17 Jan 2015 22:40, "Markus Krötzsch" <markus@semantic-mediawiki.org> wrote:
Hi Egon,

WDTK 0.3.0 is rather old and we are about to prepare a new release (there are other issues with 0.3.0: the JSON format has changed since its release and it won't read the files anyway). Could you try if the problem occurs with the current development code at github?

Cheers,

Markus

On 17.01.2015 16:59, Egon Willighagen wrote:
Hi all,

I have been trying today to get the Java library Wikidata-Toolkit
going, but about to give up... I keep running with both 0.3.0 and
current master into a NullPointerException... I thought it was how I
called the code, and did add several System.out calls, and in the end
just tried to get it running from the command line... I tried the
example from the website (though replaced the Dump examples, which I
don't see in master; btw, "mvn test" runs fine) using a pristine
master:

$ cd wdtk-examples/
$ mvn compile
$ mvn exec:java
-Dexec.mainClass="org.wikidata.wdtk.examples.EntityStatisticsProcessor"

In doing so, I get the same NPE:

********************************************************************
*** Wikidata Toolkit: EntityStatisticsProcessor
***
*** This program will download and process dumps from Wikidata.
*** It will print progress information and some simple statistics.
*** Results about property usage will be stored in a CSV file.
*** See source code for further details.
********************************************************************
2015-01-17 16:53:00 INFO  - Using download directory
/home/egonw/var/Projects/GitHub/Wikidata-Toolkit/wdtk-examples/dumpfiles/wikidatawiki
[WARNING]
java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
         at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
         at org.wikidata.wdtk.dumpfiles.DumpProcessingController.processDumpFile(DumpProcessingController.java:470)
         at org.wikidata.wdtk.dumpfiles.DumpProcessingController.processMostRecentDump(DumpProcessingController.java:456)
         at org.wikidata.wdtk.dumpfiles.DumpProcessingController.processMostRecentJsonDump(DumpProcessingController.java:426)
         at org.wikidata.wdtk.examples.ExampleHelpers.processEntitiesFromWikidataDump(ExampleHelpers.java:158)
         at org.wikidata.wdtk.examples.EntityStatisticsProcessor.main(EntityStatisticsProcessor.java:88)
         ... 6 more


I tried finding what goes wrong, but cannot grasp all the magic that
is going on... the directory it reports was created, but is empty...

$ mvn --version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_65, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-i386/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-4-686-pae", arch: "i386", family: "unix"

Can someone give me some pointers where and how it is testing of dump
files exist? Is this problem something platform dependent?

Thanks,

Egon



_______________________________________________
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l