我是Pentaho的新手。我正在尝试使用Pentaho数据集成社区版从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 Server详细信息来尝试获取数据库时出现错误消息:
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)
答案 0 :(得分:1)
在MongoDB输入步骤中,仅使用服务器主机名配置连接,而不指定用户名和密码,解决了问题.. !!
答案 1 :(得分:0)
你好Aarthi Priyadharshini - 为了完成这项工作,我在这里找到了一个链接,显示了你到底要做什么 - http://wiki.pentaho.com/display/BAD/Read+Data+From+MongoDB
由于MongoDB是一个大数据平台,因此可以在Design视图的大数据选项下找到它。观看链接上的视频,了解如何使用。
答案 2 :(得分:0)
我解决了下载PDI最新版本的问题
http://ci.pentaho.com/view/Data%20Integration/job/Kettle/
使用mongo 3.2.2包含auth并且有效!
不适合生产环境!