从 Spoon 连接到数据库时抛出错误消息。
- 选择出现在屏幕左上角的查看选项,右键单击数据库连接选项,然后选择新建。
- 在 Connection Type 下,选择 postgresql 数据库引擎。
填写“设置”选项并通过在“连接名称”中键入连接来命名。输入的所有凭据都是有效的,但我仍然收到以下错误消息:
连接到数据库 [XXX-XXX-XXX-XXX] 时出错:org.pentaho.di.core.exception.KettleDatabaseException:尝试连接到数据库时出错
连接到数据库时出错:(使用类 org.postgresql.Driver)连接尝试失败。
org.pentaho.di.core.exception.KettleDatabaseException:尝试连接数据库时出错
连接到数据库时出错:(使用类 org.postgresql.Driver)连接尝试失败。
at org.pentaho.di.core.database.Database.normalConnect(Database.java:466) at org.pentaho.di.core.database.Database.connect(Database.java:364) at org.pentaho.di.core.database.Database.connect(Database.java:335) at org.pentaho.di.core.database.Database.connect(Database.java:325) at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80) at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2734) at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:591) 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.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313) at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157) at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141) at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:43) at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:137) 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.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:88) at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:55) at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116) at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:60) at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:474) at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:461) at org.pentaho.di.ui.spoon.Spoon.newConnection(Spoon.java:8805) 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.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313) at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157) at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141) at org.pentaho.ui.xul.jface.tags.JfaceMenuitem.access$100(JfaceMenuitem.java:43) at org.pentaho.ui.xul.jface.tags.JfaceMenuitem$1.run(JfaceMenuitem.java:106) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) 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:1347) at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7989) at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9269) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:662) 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)
原因:org.pentaho.di.core.exception.KettleDatabaseException:连接数据库时出错:(使用类 org.postgresql.Driver)连接尝试失败。
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:579) at org.pentaho.di.core.database.Database.normalConnect(Database.java:450) ... 55 more
原因:org.postgresql.util.PSQLException:连接尝试失败。org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:233) org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64) org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java: 144)在 org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:29) 在 org.postgresql.jdbc3g.AbstractJdbc3gConnection.(AbstractJdbc3gConnection.java:21) 在 org.postgresql.jdbc4.AbstractJdbc4Connection.(AbstractJdbc4Connection.java:31)在 org.postgresql.jdbc4.Jdbc4Connection.(Jdbc4Connection.java:24) 在 org.postgresql.Driver.makeConnection(Driver.java:410) 在 org.postgresql.Driver.connect(Driver.java:280) 在 java.sql .DriverManager。
主机名:XXX-XXX-XXX 端口:1111 数据库名:XXX_XXX_XX
请建议我如何解决此问题