Reputation: 5241
I'm trying to do it, but getting Connection failed with unspecified error
, the full stack trace you can see at the end of the topic. When I using pgAdmin III it work flawlessly, connection from the code using this driver 9.4-1206-jdbc41
no problem, only Eclipse doesn't work.
I've tried a bunch of drivers 4.0, 4.1, 4.2, nothing helped me.
I'm using the following format here:
Database: compose
URL: postgres://<username>:<password>@aws.......dblayer.com:10336/compose
Username: <username>
Password: <password>
Eclipse version: Luna Service Release 2 (4.4.2)
The full stack trace of the exception:
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)
Upvotes: 0
Views: 429
Reputation: 5241
Ok, my url was formatted in a wrong way, the correct format is following:
jdbc:postgresql://<host>:<port>/<database>
Credit goes to this thread: Connect to Postgresql 9.2 from Eclipse Data Tools Platform
Upvotes: 1