Issue to configure river-jdbc oracle

533 Views Asked by At

I'm trying to use the elasticsearch river-jdbc plugin with an oracle database. When creating the river i got a exception :

[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

the jdbc oracle driver ojdbc7.jar ( x64 version) is in the $ES_HOME/plugins/jdbc and also $ES_HOME/lib folder.

i'm running elasticsearch v1.4.0 under windows 7 x64, elasticsearch-river-jdbc-1.4.0.3.Beta1

here's the river config :

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"
    }
}

i don't see what's missing in my setup

Regards

0

There are 0 best solutions below