Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Bug (?) in JDB



Hello all,

I've noticed that when using Java and postgres-jdbc, setting ssl=false
in Properties doesn't get read, and ssl=false and ssl=true both cause
SSL to be tried.

E.g:

 String url              = "jdbc:postgresql://"+host+"/"+database;
        Properties props = new Properties();
        props.setProperty("user",       "blah");
        props.setProperty("password",   "blah");
        props.setProperty("ssl",        "false");
        props.setProperty("sslfactory",
"org.postgresql.ssl.NonValidatingFactory");
        Connection conn = null;
        conn = DriverManager.getConnection(url, props);

causes it to throw: org.postgresql.util.PSQLException: The server does
not support SSL. (even though I've said not to try SSL).

 String url              = "jdbc:postgresql://"+host+"/"+database;
        Properties props = new Properties();
        props.setProperty("user",       "blah");
        props.setProperty("password",   "blah");
        // Don't even set these ones below, as they seem to make it
try SSL regardless.
   //     props.setProperty("ssl",        "false");
   //     props.setProperty("sslfactory",
"org.postgresql.ssl.NonValidatingFactory");
        Connection conn = null;
        conn = DriverManager.getConnection(url, props);

works fine.

Problem exists both with postgresql-8.2-505.jdbc3.jar and
postgresql-8.2-507.jdbc3.jar

C

-- 
bash# Got root? Get root. Fast Linux VPS
http://linuxvps.org/



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group