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

Jdbc driver connection error

From: "Ashish Sharma" <A(dot)Sharma(at)toa(dot)toasia(dot)co(dot)jp>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Jdbc driver connection error
Date: 1999-11-09 22:31:14
Message-ID: 001b01bf2b02$220bf080$9800a8c0@toasia.co.jp (view raw or flat)
Thread:
Lists: pgsql-interfaces
Well, I compiled postgresql.jar, included it in CLASSPATH, and then ran the
example.

Here's what I did, and what I get:

-----------
[postgres(at)linux jdbc]$ java example.basic jdbc:postgresql:template1 postgres
postgres
PostgreSQL basic test v6.3 rev 1

Connecting to Database URL = jdbc:postgresql:template1
Exception caught.
java.lang.IllegalArgumentException: Argument # > Arg length
java.lang.IllegalArgumentException: Argument # > Arg length
 at java.text.MessageFormat.format(MessageFormat.java)
 at java.text.MessageFormat.format(MessageFormat.java)
 at java.text.MessageFormat.format(MessageFormat.java)
 at postgresql.util.PSQLException.translate(PSQLException.java:83)
 at postgresql.util.PSQLException.<init>(PSQLException.java:45)
 at postgresql.Driver.connect(Driver.java:108)
 at java.sql.DriverManager.getConnection(DriverManager.java:83)
 at java.sql.DriverManager.getConnection(DriverManager.java:126)
 at example.basic.<init>(basic.java:32)
 at example.basic.main(basic.java:171)
[postgres(at)linux jdbc]$

-----------
And then I ran it using Debug option:
-----------

[postgres(at)linux jdbc]$ java example.basic jdbc:postgresql:template1 postgres
postgres debug
PostgreSQL basic test v6.3 rev 1

DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver:
driver[className=postgresql.Driver,context=null,postgresql(dot)Driver(at)80aadf8]
Connecting to Database URL = jdbc:postgresql:template1
DriverManager.getConnection("jdbc:postgresql:template1")
    trying
driver[className=postgresql.Driver,context=null,postgresql(dot)Driver(at)80aadf8]
-- listing properties --
password=postgres
Protocol=postgresql
user=postgres
PGDBNAME=template1
Using postgresql.jdbc1.Connection
Exception caught.
java.lang.NullPointerException:
java.lang.NullPointerException:
 at java.io.Writer.write(Writer.java)
 at java.io.PrintStream.write(PrintStream.java)
 at java.io.PrintStream.print(PrintStream.java)
 at java.io.PrintStream.println(PrintStream.java)
 at java.lang.Throwable.printStackTrace(Throwable.java)
 at java.sql.SQLException.<init>(SQLException.java:102)
 at postgresql.util.PSQLException.<init>(PSQLException.java:42)
 at postgresql.Driver.connect(Driver.java:108)
 at java.sql.DriverManager.getConnection(DriverManager.java:83)
 at java.sql.DriverManager.getConnection(DriverManager.java:126)
 at example.basic.<init>(basic.java:32)
 at example.basic.main(basic.java:171)
[postgres(at)linux jdbc]$

-----------

What's that I am missing??

Thanx a lot.

-Ashish

pgsql-interfaces by date

Next:From: Ashish SharmaDate: 1999-11-09 22:45:22
Subject: Jdbc driver connection error
Previous:From: The Hermit HackerDate: 1999-11-09 21:39:20
Subject: Re: [HACKERS] CORBA STATUS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group