0

Hi i want to write a river for my MSSQL 2008 R2 Server. I have copied the MSSQL Driver and the jdbc jar into the bin/plugins/jdbc directory. I have tested the MSSQL driver in Solr and it works fine. So the connection string is correct.

When i'm starting the ES server i get this exceprions:

    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:135)
        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)
        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)
        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:93)
        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:724)
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:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:73)
        ... 9 more

My curl looks like that:

    curl -XPUT http://localhost:9200/_river/documents/_meta -d '
{
    "type" : "jdbc",
    "jdbc" : {
                "driver" : "com.microsoft.sqlserver.jdbc.SQLServerDriver",
                "url" : "jdbc:sqlserver://CPCDKD3;databaseName=Sampledocs",
                "user" : "XXXX",
                "password" : "XXXX",
                "sql" : "SELECT * from Docs"
    },
    "index" : {
                "index" : "documents",
                "type" : "FieldId",
                "type" : "FieldTitle",
                "type" : "FieldCOntent"
    }
}'
Roopendra
  • 7,674
  • 16
  • 65
  • 92
King Luy
  • 141
  • 3
  • 15

1 Answers1

1

ok SOLVED. The plugin must be placed into $ES_Home\plugins not into $ES_Home\bin\plugins

King Luy
  • 141
  • 3
  • 15