odd postgresql connection error
I'm seeing connection error when connecting to a database using JDBC. However, I'm able to connect to the same database using psql. Here's my connect string 

    "jdbc:postgresql://127.0.0.1:5432/sample?user=postgres&password=postgres&loglevel=2"

I see the following logs upon connect and then the PSQLException. 


    16:33:49.425 (1) PostgreSQL 9.1 JDBC4 (build 901)
    16:33:49.431 (1) Trying to establish a protocol version 3 connection to 127.0.0.1:5432
    16:33:49.443 (1)  FE=> StartupPacket(user=postgres, database=sample, client_encoding=UTF8, DateStyle=ISO, extra_float_digits=2)
    16:33:49.448 (1)  <=BE AuthenticationReqMD5(salt=da8b7230)
    16:33:49.449 (1)  FE=> Password(md5digest=md5dc7d3827e761b7b18f553d6bdd15fa21)
    16:33:49.451 (1)  <=BE AuthenticationOk
    16:33:49.467 (1)  <=BE ErrorMessage(FATAL: database "sample" does not exist)
    org.postgresql.util.PSQLException: FATAL: database "sample" does not exist

However, I'm able to connect fine with psql command

    $ psql -U postgres sample
    psql (9.1.4)
    Type "help" for help.
    
    sample=#

What else can I try to isolate the issue?

odd postgresql connection error
===

I'm seeing connection error when connecting to a database using JDBC. However, I'm able to connect to the same database using psql. Here's my connect string 

    "jdbc:postgresql://127.0.0.1:5432/sample?user=postgres&password=postgres&loglevel=2"

I see the following logs upon connect and then the PSQLException. 


    16:33:49.425 (1) PostgreSQL 9.1 JDBC4 (build 901)
    16:33:49.431 (1) Trying to establish a protocol version 3 connection to 127.0.0.1:5432
    16:33:49.443 (1)  FE=> StartupPacket(user=postgres, database=sample, client_encoding=UTF8, DateStyle=ISO, extra_float_digits=2)
    16:33:49.448 (1)  <=BE AuthenticationReqMD5(salt=da8b7230)
    16:33:49.449 (1)  FE=> Password(md5digest=md5dc7d3827e761b7b18f553d6bdd15fa21)
    16:33:49.451 (1)  <=BE AuthenticationOk
    16:33:49.467 (1)  <=BE ErrorMessage(FATAL: database "sample" does not exist)
    org.postgresql.util.PSQLException: FATAL: database "sample" does not exist

However, I'm able to connect fine with psql command

    $ psql -U postgres sample
    psql (9.1.4)
    Type "help" for help.
    
    sample=#

What else can I try to isolate the issue?
