Elasticsearch River SQL Server集成出错

时间:2015-10-26 06:17:29

标签: sql-server elasticsearch elasticsearch-plugin elasticsearch-jdbc-river

我收到以下错误

foreach($datas->ques as $values)
 {
     $name = $values['name'];
     $value = $values['value'];
     $user_id = $values['user_id'];
 }

River Plugin使用

java.io.IOException: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed.
        at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:353)
        at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.fetch(SimpleRiverFlow.java:226)
        at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.execute(SimpleRiverFlow.java:152)
        at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.request(RiverPipeline.java:88)
        at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:66)
        at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:30)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        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:745)
Caused by: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed.
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
        at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1516)
        at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1485)
        at com.mysql.jdbc.RowDataDynamic.close(RowDataDynamic.java:191)
        at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:7466)
        at com.mysql.jdbc.ResultSetImpl.close(ResultSetImpl.java:881)
        at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.close(SimpleRiverSource.java:842)
        at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.execute(SimpleRiverSource.java:422)
        at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:332)

我正在运行Select Query以从SQL Server获取数据

我正在使用sql server连接器 - sqljdbc4.jar

请帮我解决错误

0 个答案:

没有答案