0
我正在嘗試爲我的Watson發現服務設置本地mongodb抓取工具。 MongoDB正在運行。我下載了JDBC連接器(mongodb-driver-3.4.2.jar)並將其放置在/opt/ibm/crawler/connectorFramework/crawler-connector-framework-0.1.18/lib/java/database/Watson Discovery抓取工具:無法加載JDBC驅動程序
設置我告訴你我是如何修改的配置文件:
在crawler.conf,在一節中「input_adapter」我改變了以下值:
crawl_config_file = "connectors/database.conf",
crawl_seed_file = "seeds/database-seed.conf",
extra_jars_dir = "database",
在種子/數據庫seed.conf,在種子>屬性部分,url的部分看起來像這樣:
{
name ="url",
value="mongo://localhost:27017/local/tweets?per=1000"
},
(試圖也使用的mongodb代替蒙戈)
在連接器/ database.conf,該文件的第一部分看起來像這樣:
crawl_extender {
attribute = [
{
name="protocol",
value="mongo"
},
{
name="collection",
value="SomeCollection"
}
],
(使用的mongodb代替蒙戈也試過)
當我運行的履帶式命令,這是我的輸出:
[email protected]:~$ crawler crawl --config ./crawler-config/config/crawler.conf
2017-08-02 04:29:10,206 INFO: Connector Framework service will start and connect to crawler on port 35775
2017-08-02 04:29:10,460 INFO: This crawl is running in CrawlRun mode
2017-08-02 04:29:10,460 INFO: Running a crawl...
2017-08-02 04:29:10,465 INFO: URLs matching these patterns will be not be processed: (?i)\.(xlsx?|pptx?|jpe?g|gif|png|mp3|tiff)$
2017-08-02 04:29:10,500 INFO: HikariPool-1 - Starting...
2017-08-02 04:29:10,685 INFO: HikariPool-1 - Start completed.
2017-08-02 04:29:12,161 ERROR: There was a problem processing URL mongo://localhost:27017/local/tweets?per=1000: Couldn't load JDBC driver :
2017-08-02 04:29:17,184 INFO: HikariPool-1 - Shutdown initiated...
2017-08-02 04:29:17,196 INFO: HikariPool-1 - Shutdown completed.
2017-08-02 04:29:17,198 INFO: The service for the Connector Framework Input Adapter was signaled to halt.
Attempting to shutdown the crawler cleanly.
我在想什麼或幹什麼在我的抓取工具中出現錯誤?
看起來您需要一個適用於MongoDB的JDBC 3.0兼容驅動程序來[將您的數據存儲庫連接到每個IBM的爬網](https://www.ibm.com/watson/developercloud/doc/discovery/data-crawler-seeds的.html#配置數據庫抓取選項)。您可以嘗試來自經MongoDB認證的DataDirect的[商用MongoDB JDBC](https://www.progress.com/jdbc/mongodb)驅動程序。請注意,我受Progress的使用。 –
爲了測試的緣故,我嘗試了使用MySQL及其連接器與JDBC 3.0兼容併發生相同的錯誤。我不知道爲什麼抓取程序無法加載除捆綁的其他JDBC驅動程序以外的其他JDBC驅動程序,並且我無法找到足夠的文檔說明如何解決此問題。 –