curl -XPUT localhost:9200/_river/my_jdbc_river/_meta -d
"{
"type" : "jdbc",
"jdbc" :
{
"driver" : "com.mysql.jdbc.Driver",
"url" : "jdbc:mysql://localhost:3306/springtest",
"user" : "root",
"password" : "root",
"sql" : "select * from register",
"index" : "my_register",
"type" : "my_register_type"
}
}"
the connection successfull but error tab will generated like
error: NoClassSettingsException[Failed to load class with value [jdbc]]; nested:
ClassNotFoundException[jdbc];
1 回答
我认为你需要添加
"driver": "com.mysql.jdbc.Driver"
到你的jdbc定义 .
另外,请检查您是否已完成上述所有步骤:https://github.com/jprante/elasticsearch-river-jdbc/wiki/Quickstart
(特别是第4和第5页,与向ElasticSearch实例注册MySQL驱动程序有关)