Well, my problem isn't with the JDBC driver. I still haven't learnt to
use it. I'm doing now. The initial exception, when i was trying to
connect in such a way:
String url = "jdbc:postgresql:BDPrueba";
Connection con = DriverManager.getConnection(url,"","");
was:
Connection refused. Check that the hostname and port is correct, and
that the po
stmaster is running with the -i flag, which enables TCP/IP networking.
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.sql.SQLException.(Compiled Code)
at postgresql.util.PSQLException.(Compiled Code)
at postgresql.Connection.openConnection(Compiled Code)
at postgresql.Driver.connect(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at prueba.main(Compiled Code)
and when I'm trying to connect in this way:
String url = "jdbc:postgresql:BDPrueba";
Connection con = DriverManager.getConnection(url,"","");
my problem is:
Unknown object of type:java.lang.NullPointerException
java.lang.IllegalArgumentException: Unknown argument
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.lang.RuntimeException.(Compiled Code)
at java.lang.IllegalArgumentException.(Compiled Code)
at java.text.MessageFormat.format(Compiled Code)
at java.text.MessageFormat.format(Compiled Code)
at java.text.MessageFormat.format(Compiled Code)
at postgresql.util.PSQLException.translate(Compiled Code)
at postgresql.util.PSQLException.(Compiled Code)
at postgresql.Driver.connect(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at prueba.main(Compiled Code)
I've checked that postmaster is running in Solaris 5.6 with -i option. I
think the problem may be that i'm not defining users, but in the
pg_hba.conf file the defaults are that anyone in anywhere can connects
to any database.
What can i do?
Thanks for thinking a little time in this question.
Javi.
begin:vcard
n:Benito;Javier
x-mozilla-html:FALSE
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Javier Benito
end:vcard
S/MIME Cryptographic Signature