Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Bug (?) in JDB
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1874 of 1984
Post > Topic >>

Bug (?) in JDB

by caluml@[EMAIL PROTECTED] (Calum) Jan 21, 2008 at 02:00 PM

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/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@[EMAIL PROTECTED]
 so that your
       message can get through to the mailing list cleanly




 2 Posts in Topic:
Bug (?) in JDB
caluml@[EMAIL PROTECTED]   2008-01-21 14:00:34 
Re: Bug (?) in JDB
books@[EMAIL PROTECTED]   2008-01-21 17:23:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 9:33:37 CDT 2008.