Having issues connecting to postgres in Azure - because by default SSL 
connections are required. I am using:

  *   cayenne 3.1 - yes I know it's old but it's what I'm stuck with
  *   latest postgres JDBC driver

Code snippets below.

On the JDBC_URLPROPERTY I have tried every flavor of ssslmode=required or 
usessl=true that I've been able to dredge up, but consistenyly getting:

Unable to connect to server: FATAL: SSL connection is required. Please specify 
SSL options and retry.

Hopefully I am just overlooking something simple and obvious. Any insights?

Module m1 = new Module() {
public void configure(Binder binder) {
binder.bindMap(Constants.PROPERTIES_MAP).put(Constants.JDBC_DRIVER_PROPERTY, 
"org.postgresql.Driver")
.put(Constants.JDBC_URL_PROPERTY, 
"jdbc:postgresql://mypostgres.postgres.database.azure.com:5432/are")
.put(Constants.JDBC_USERNAME_PROPERTY, "<username>")
.put(Constants.JDBC_PASSWORD_PROPERTY, "<password>");
}
};

cayenneRuntime = new ServerRuntime("cayenne-ARETariffDomain.xml", m1);
DataDomain dd = cayenneRuntime.getDataDomain();
Collection<DataMap> dmaps =  dd.getDataMaps();
for (DataMap dm: dmaps) {
for (DbEntity entity: dm.getDbEntities()) {
entity.setSchema("p");
}
}
ObjectContext ORMContext = cayenneRuntime.getContext();




Rick Bonnett

Programmer Analyst

Ascent Global Logistics

[X]

PO Box 1039, Augusta, ME, 04332

Office: 207.620.8670

ascentgl.com<http://ascentgl.com/>



[cid:057dc11d-0cbe-4fd6-80ad-b0cd49131cc0]

The information transmitted is intended only for the person or entity to which 
it is addressed and may contain proprietary, business-confidential and/or 
privileged material. If you are not the intended recipient of this message you 
are hereby notified that any use, review, retransmission, dissemination, 
distribution, reproduction or any action taken in reliance upon this message is 
prohibited. If you received this in error, please contact the sender and delete 
the material from any computer.

Reply via email to