[英]In Apache Solr DataImport Getting this Error: “Unable to execute query”
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/mydb"
user="root"
password="root"
/>
<document name="bestsellerscats_1">
<entity name="bestsellerscats" query="SELECT id, name FROM testtable">
<field column="id" name="id"/>
<field column="name" name="name"/>
</entity>
</document>
</dataConfig>
This is the error message: 这是错误消息:
Exception while processing: bestsellerscats document : SolrInputDocument(fields: []):org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT id, name FROM testtable Processing Document # 1
处理中的异常:畅销书猫文档:SolrInputDocument(fields:[]):org.apache.solr.handler.dataimport.DataImportHandlerException:无法执行查询:SELECT id,名称来自testtable处理文档#1
Any Help? 有帮助吗?
I think the problem is with your url. 我认为问题出在您的网址上。 Try to maintain the following format.
尝试保持以下格式。
jdbc:mysql://<ip>:<port>/<myDB>
In your case you need to have, if you are using the default mysql port. 如果您使用的是默认的mysql端口,则需要使用。
url="jdbc:mysql://localhost:3306/mydb"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.