pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ashish Sharma <A.Sharma@toa.toasia.co.jp>
To: pgsql-interfaces@postgresql.org
Subject: Jdbc driver connection error
Date: Wed, 10 Nov 1999 07:45:22 +0900
Message-ID: <005d01bf2b04$1bc93d20$9800a8c0@toasia.co.jp> (raw)

It's kinda urgent, if u cud help !!

Well, I compiled postgresql.jar, included it in CLASSPATH, and then ran the
example.
(RedHat Linux6.0, postgreSQL6.5.2 on Intel Celeron)

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

-----------
[postgres@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@linux jdbc]$

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

[postgres@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.Driver@80aadf8]
Connecting to Database URL = jdbc:postgresql:template1
DriverManager.getConnection("jdbc:postgresql:template1")
    trying
driver[className=postgresql.Driver,context=null,postgresql.Driver@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@linux jdbc]$

-----------

What's that I am missing??

Thanx a lot.

-Ashish

view thread (3+ messages)  latest in thread

Message-ID: <005d01bf2b04$1bc93d20$9800a8c0@toasia.co.jp>
Permalink:  ../005d01bf2b04$1bc93d20$9800a8c0@toasia.co.jp/
Also on:    postgresql.org/message-id/005d01bf2b04$1bc93d20$9800a8c0@toasia.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: A.Sharma@toa.toasia.co.jp
  Subject: Re: Jdbc driver connection error
  In-Reply-To: <005d01bf2b04$1bc93d20$9800a8c0@toasia.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox