1

我是 Pentaho 的新手。我正在尝试使用 Pentaho Data Integration Community Edition 从 MongoDB 读取数据。在尝试执行 MongoDB 输入步骤时,我收到身份验证失败错误。我发现,错误是由于 PDI 中缺少 MongoDb 驱动程序。

后来我下载了mongodb-driver-3.2.2.jar文件,添加到位置E:\pdi-ce-6.0.1.0-386\data-integration\lib。但问题仍然存在。

在尝试通过在 Pentaho MongoDb 输入步骤中提供 MongoDb 连接详细信息来获取 Dbs 时,我收到错误 java.nullpointerException。

有人可以让我知道我在这里做错了什么吗?

尝试通过在Spoon中提供有效的 Mongo 服务器详细信息来获取数据库时出现错误消息:

Unable to connect to MongoDB - check connection details : 'ok' should never be null...

错误详细信息和可能异常的堆栈跟踪:

org.pentaho.di.core.exception.KettleException: 
java.lang.IllegalArgumentException: 'ok' should never be null...
'ok' should never be null...

    at org.pentaho.mongo.wrapper.NoAuthMongoClientWrapper.getDatabaseNames(NoAuthMongoClientWrapper.java:358)
    at org.pentaho.di.ui.trans.steps.mongodbinput.MongoDbInputDialog.setupDBNames(MongoDbInputDialog.java:1442)
    at org.pentaho.di.ui.trans.steps.mongodbinput.MongoDbInputDialog.access$300(MongoDbInputDialog.java:82)
    at org.pentaho.di.ui.trans.steps.mongodbinput.MongoDbInputDialog$4.widgetSelected(MongoDbInputDialog.java:450)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.trans.steps.mongodbinput.MongoDbInputDialog.open(MongoDbInputDialog.java:1079)
    at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:124)
    at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:8797)
    at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:3027)
    at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:744)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1316)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7979)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9310)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:654)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Caused by: java.lang.IllegalArgumentException: 'ok' should never be null...
    at com.mongodb.CommandResult.ok(CommandResult.java:43)
    at com.mongodb.CommandResult.throwOnError(CommandResult.java:109)
    at com.mongodb.DBPort$NativeAuthenticator.authenticate(DBPort.java:545)
    at com.mongodb.DBPort.authenticate(DBPort.java:322)
    at com.mongodb.DBPort.checkAuth(DBPort.java:333)
    at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:243)
    at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)
    at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)
    at com.mongodb.DB.command(DB.java:261)
    at com.mongodb.DB.command(DB.java:243)
    at com.mongodb.DB.command(DB.java:300)
    at com.mongodb.Mongo.getDatabaseNames(Mongo.java:384)
    at org.pentaho.mongo.wrapper.NoAuthMongoClientWrapper.getDatabaseNames(NoAuthMongoClientWrapper.java:353)
4

3 回答 3

2

在 MongoDB 输入步骤中,仅使用服务器主机名配置连接,无需指定用户名和密码,即可解决问题.. !!

于 2016-04-12T13:43:58.083 回答
0

嗨 Aarthi Priyadharshini - 为了完成这项工作,我在此处找到了一个链接,该链接向您展示了该做什么 - http://wiki.pentaho.com/display/BAD/Read+Data+From+MongoDB

由于 MongoDB 是一个大数据平台,因此可以在设计视图的大数据选项下找到它。观看链接上的视频以准确了解如何使用。

于 2016-03-16T15:15:38.577 回答
0

我解决了下载 PDI 最新版本的问题

http://ci.pentaho.com/view/Data%20Integration/job/Kettle/

包含 mongo 3.2.2 的身份验证并且有效!

不适用于生产环境!

于 2016-10-06T00:03:54.273 回答