有人成功连接Compose将PostgreSQL提供给Eclipse的数据库查看器吗?

时间:2016-03-29 11:21:45

标签: eclipse postgresql jdbc postgresql-9.4 compose

我正在尝试这样做,但是获得Connection failed with unspecified error,您可以在主题末尾看到完整的堆栈跟踪。当我使用 pgAdmin III 时,它运行完美,使用此驱动程序9.4-1206-jdbc41的代码连接没问题,只有Eclipse不起作用。

我尝试了一堆驱动程序4.0,4.1,4.2,没有任何帮助。

我在这里使用以下格式:

enter image description here

Database: compose
URL: postgres://<username>:<password>@aws.......dblayer.com:10336/compose
Username: <username>
Password: <password>

Eclipse版:Luna Service Release 2(4.4.2)

异常的完整堆栈跟踪

java.lang.Exception: Connection failed with unspecified error.
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:110)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at org.eclipse.datatools.enablement.internal.postgresql.PostgreSQLJDBCConnection.<init>(PostgreSQLJDBCConnection.java:47)
at org.eclipse.datatools.enablement.internal.postgresql.PostgreSQLConnectionFactory.createConnection(PostgreSQLConnectionFactory.java:51)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

1 个答案:

答案 0 :(得分:1)

好的,我的网址格式错误,格式正确如下:

jdbc:postgresql://<host>:<port>/<database>

归功于这个主题:Connect to Postgresql 9.2 from Eclipse Data Tools Platform