I'm making my first go at writing a river. (Here's the source code)
I followed this tutorial and compared it to this existing river, but I haven't had much luck.
To deploy the river, I created a folder called example-river
, dropped my jar in that folder, and restarted the node. Everything starts up fine.
I have also tried bin/plugin --url file:///path/to/plugin --install example-river
, which seems to work, but it unpacks my jar.
When I issue this PUT request:
http://localhost:9200/_river/example_river/_meta
{
"type": "example_river",
"example_river":{
"blah":"blah"
}
}
I get this exception:
[2014-04-20 22:28:46,538][DEBUG][river ] [Gloom] creating river [example_river][example_river] [2014-04-20 22:28:46,543][WARN ][river ] [Gloom] failed to create river [example_river][example_river] org.elasticsearch.common.settings.NoClassSettingsException: Failed to load class with value [example_river] at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:87) at org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:58) at org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.java:44) at org.elasticsearch.river.RiversService.createRiver(RiversService.java:137) at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:275) at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:269) at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:93) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: example_river at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:73) ... 9 more
Can someone point out what I am missing?