我正在尝试将 elasticsearch river-jdbc 插件与 oracle 数据库一起使用。创建河流时,我遇到了一个例外:
[2014-12-10 11:42:44,795][WARN ][river ] [Agent Axis] failed to create river [jdbc][quotes]
org.elasticsearch.common.settings.NoClassSettingsException: Failed to load class with value [jdbc]
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:113)
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: jdbc
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
jdbc oracle 驱动程序 ojdbc7.jar(x64 版本)位于 $ES_HOME/plugins/jdbc 和 $ES_HOME/lib 文件夹中。
我在 windows 7 x64 下运行 elasticsearch v1.4.0,elasticsearch-river-jdbc-1.4.0.3.Beta1
这是河流配置:
PUT _river/quotes/_meta
{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:oracle:thin@//localhost:1520/test",
"user" : user,
"password" : pwd,
"sql" : {
"statement" : "select id as \"_id\",quotes.* from quotes where mytimestamp > ?",
"parameter" : ["$river.state.last_active_begin"]
},
"index" : "quotes",
"type" : "quote"
}
}
我没有看到我的设置中缺少什么
问候