No response after running an attempted database connect.

From: "dlangschied" <dlangschied(at)ameritech(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: No response after running an attempted database connect.
Date: 2003-05-23 14:55:48
Message-ID: 002701c3213b$66b0b670$6401a8c0@lcshost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello all!

I have created a simple database connection application in java2. The app
compiles just fine. When I run it, I just go right back to the prompt, as
if the program completed successfully. The problem is that it should have
failed.

A little background:

I want to connect to a postgres database running (with -i invoked) on Linux
from a Windows XP Workstation.

1. I downloaded the postgres jar file "pg73jdbc3.jar" from the web site. I
placed this file in the C:\java\jre\lib\ext directory.

2. I set CLASSPATH=C:\java\jre\lib\ext\pg73jdbc3.jar;c:\JavaApps

3. I wrote a simple program to test this connection.

import java.sql.*;

public class UsrPwdVer
{
private Connection con;
private UsrPwdVer()
{
try
{
Class.forName("org.postgres.Driver");
}
catch (Exception e)
{
System.out.println(
"Failed to load postgres driver.");
return;
}
try
{
con =
DriverManager.getConnection("jdbc:postgresql://192.168.1.101/pgerp","pg","pg
");
}
catch (Exception e)
{
System.err.println("problems connecting to database");
}
}
public static void main(String args[])
{
}
}

pg is not a user so I should have expected to see "problems connecting to
database".

What did I miss?

Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone: (586)777-7542
Cell: (248)789-8493
e-mail: dlangschied(at)ameritech(dot)net

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Thomas 2003-05-23 17:38:39 Re: No response after running an attempted database connect.
Previous Message Vincenzo Angelone 2003-05-23 14:18:50 PGSQL Connection