3
curl -XPUT localhost:9200/_river/my_jdbc_river/_meta -d
           "{
                “类型”:“jdbc”,
                      “jdbc”:
                       {
                        “驱动程序”:“com.mysql.jdbc.Driver”,
                        "url" : "jdbc:mysql://localhost:3306/springtest",
                        “用户”:“根”,
                        “密码”:“根”,
                        "sql" : "从寄存器中选择 *",
                        “索引”:“我的注册”,
                        “类型”:“我的注册类型”
                       }
           }"

连接成功,但会生成错误选项卡

error: NoClassSettingsException[Failed to load class with value [jdbc]]; nested:   
ClassNotFoundException[jdbc]; 
4

1 回答 1

0

我想你需要添加

"driver": "com.mysql.jdbc.Driver"

到您的 jdbc 定义。

此外,请检查您是否已完成此处提到的所有步骤:https ://github.com/jprante/elasticsearch-river-jdbc/wiki/Quickstart

(尤其是第 4 和 5 页,与向您的 ElasticSearch 实例注册 MySQL 驱动程序相关)

于 2014-07-07T06:57:55.780 回答