[Maybe let's move this to wikidata-tech -- including the Wikidata
discussion list here for the last time; please remove it in your reply]
Dear Satya,
Both issues you encountered seem to be caused by how you run the
examples. It seems that the project is not configured/compiled properly
yet. To help you, I need to know how you downloaded and ran WDTK. There
two main options:
(1) Develop stand-alone code that works with the released libraries, as
provided by Maven Central. This method is described here:
https://www.mediawiki.org/wiki/Wikidata_Toolkit#Beginner.27s_guide
(2) Extend the Wikidata Toolkit project by adding own examples etc. In
this case, you would download (clone/branch) the code and build all of
Wikidata Toolkit locally. Our developers' guide describes how to set up
our project in Eclipse:
https://www.mediawiki.org/wiki/Wikidata_Toolkit/Eclipse_setup
Tests are only included in the source code, so I suppose you have
followed (2)? Or did you just download the code and compile it with
Maven locally (no Eclipse)?
Best regards,
Markus
On 20.10.2015 13:31, Satya Gadepalli wrote:
> Issue 1: Tests are failing as I am not able to
> find testdump-20150512.json.gz
>
> Any Idea where i can find this file?
>
> Issue 2: FetchOnlineDataExample is failing due to MediaWikiApiErrorException
>
>
> E:\temp\WikiData\Execute>call java -cp wdtk-examples-0.5.0.jar
> org.wikidata.wdtk.examples.FetchOnlineDataExample
> Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
> Error: A JNI error has occurred, please check your installation and try
> again
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/wikidata/wdtk/wikibaseapi/apierrors/MediaWikiApiErrorException
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
> at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
> at java.lang.Class.getMethod0(Class.java:3018)
> at java.lang.Class.getMethod(Class.java:1784)
> at
> sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
> at
> sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
> Caused by: java.lang.ClassNotFoundException:
> org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 7 more
>
> Any help?
>
> thx
>
>
> _______________________________________________
> Wikidata mailing list
> Wikidata(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
So I would like to create a statement with a qualifier, in one go.
I do *not* want to use wbcreateclaim/wbsetqualifier if possible.
I have tried:
action=wbsetclaim
claim={ "type": "claim", "mainsnak": { "snaktype": "value", "property":
"P50", "datatype": "wikibase-item", "datavalue": { "value": {
"entity-type": "item", "numeric-id": 2069573 }, "type": "wikibase-entityid"
} }, "qualifiers": { "P1545": [ { "snaktype": "value", "property": "P1545",
"datavalue": { "value": "8", "type": "string" }, "datatype": "string" } ]
}, "rank": "normal" }
But it complains about the missing GUID. Is there a way to create one
automatically? Or to "fake" it? Neither the API or the docs on mediawiki.org
were helpful in that respect.