jprante / elasticsearch-jdbc

JDBC importer for Elasticsearch
Apache License 2.0
2.84k stars 709 forks source link

Elastic Search is not fetching result using river #516

Open endodas opened 9 years ago

endodas commented 9 years ago

Hi, I am trying to create an elastic search with jdbc river. I am able to create a river but not able to get result from it. The elasticsearch log says error that failed to create river , noclasssetting found exception. I changed the permission in plugins folder but still getting the error. when I try to get value from the ://localhost:9200/_river/_search option , I am not getting the value from DB.

jprante commented 9 years ago

Can you post the commands you used and the exact messages in the log?

endodas commented 9 years ago

This is what i tried: http://localhost:9200/_river/type/_meta { "type" : "jdbc", "jdbc" : { "driver" : "com.mysql.jdbc.Driver", "url" : "jdbc:mysql://localhost:3306/test", "user" : "root", "password" : "bgw", "index" : "src", "type" : "type", "sql" : " select * from test_table;" } }

and following is the error I am getting

[2015-04-01 14:52:32,383][WARN ][river ] [Roma] failed to cre ate river [jdbc][type] org.elasticsearch.common.settings.NoClassSettingsException: Failed to load class with value [jdbc] at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:8 7) at org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:58)

    at org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.jav

a:44) at org.elasticsearch.river.RiversService.createRiver(RiversService.java: 137) at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(Rivers Service.java:273) at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(Rivers Service.java:267) at org.elasticsearch.action.support.TransportAction$ThreadedActionListen er$1.run(TransportAction.java:113) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: jdbc at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:7 3) ... 9 more

jprante commented 9 years ago

The JDBC plugin was not installed. Check folders and permissions.