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

java.lang.IllegalArgumentException with OntoGazetteer #5

Closed
pvk444 opened this issue Mar 8, 2020 · 1 comment
Closed

java.lang.IllegalArgumentException with OntoGazetteer #5

pvk444 opened this issue Mar 8, 2020 · 1 comment

Comments

@pvk444
Copy link

pvk444 commented Mar 8, 2020

Trying to load OntoGazetteer from Onto Tools 8.5 into GATE 8.6.1 with the "standard" list URL setting:

jar:file:/C:/Users/pvkoh/.m2/repository/uk/ac/gate/plugins/ontology-tools/8.5/ontology-tools-8.5.jar!/ANNIE/resources/gazetteer/lists.def

I get the following error:

java.lang.IllegalArgumentException: argument type mismatch
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at gate.creole.AbstractResource.setParameterValue(AbstractResource.java:236)
	at gate.creole.AbstractResource.setParameterValues(AbstractResource.java:276)
	at gate.creole.AbstractResource.setParameterValues(AbstractResource.java:438)
	at gate.Factory.createResource(Factory.java:324)
	at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
	at java.base/java.lang.Thread.run(Thread.java:830)
gate.creole.ResourceInstantiationException: couldn't invoke set method for listsURL on gate.creole.gazetteer.OntoGazetteerImpl: java.lang.IllegalArgumentException: argument type mismatch
	at gate.creole.AbstractResource.setParameterValue(AbstractResource.java:241)
	at gate.creole.AbstractResource.setParameterValues(AbstractResource.java:276)
	at gate.creole.AbstractResource.setParameterValues(AbstractResource.java:438)
	at gate.Factory.createResource(Factory.java:324)
	at gate.gui.NewResourceDialog$4.run(NewResourceDialog.java:270)
	at java.base/java.lang.Thread.run(Thread.java:830)

As I am not familiar (yet) with the design and coding of GATE, all my other attempts failed similarly (although with different error messages). I tried in particular to copy the listURL from ANNIE Gazetteer (which itself works fine), i.e. :

creole://uk.ac.gate.plugins;annie;8.6/resources/gazetteer/lists.def

or to refer to lists.def directly after extracting the resources/gazetter folder from the anni jar file. However, none of these worked.

Lastly, I don't know whether ANNIE in

jar:file:/C:/Users/pvkoh/.m2/repository/uk/ac/gate/plugins/ontology-tools/8.5/ontology-tools-8.5.jar!/ANNIE/resources/gazetteer/lists.def

refers to an environment variable which I might have missed.

Any help with this would be greatly appreciated.

@greenwoodma greenwoodma transferred this issue from GateNLP/gate-core Jan 27, 2021
@greenwoodma
Copy link
Contributor

Turns out this was a bug left over from when the plugin was updated to be maven based. It's closed via 8f7cf04
but you'll need to use version 8.6-SNAPSHOT or above of the plugin to get it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants