RE: [INTERFACES] Jdbc driver connection error

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Ashish Sharma'" <A(dot)Sharma(at)toa(dot)toasia(dot)co(dot)jp>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: [INTERFACES] Jdbc driver connection error
Date: 1999-11-10 07:06:13
Message-ID: 1B3D5E532D18D311861A00600865478C25E82E@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Ah, the 6.5.1 driver :-)

Edit the errors.properties file, and replace first all references to {1}
to {0}, then {2} to {1}.

This was fixed about 5 minutes after 6.5.1 was released :-)

Peter

> -----Original Message-----
> From: Ashish Sharma [SMTP:A(dot)Sharma(at)toa(dot)toasia(dot)co(dot)jp]
> Sent: 09 November 1999 22:45
> To: pgsql-interfaces(at)postgreSQL(dot)org
> Subject: [INTERFACES] Jdbc driver connection error
>
> 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(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)80aa
> df8]
> Connecting to Database URL = jdbc:postgresql:template1
> DriverManager.getConnection("jdbc:postgresql:template1")
>     trying
> driver[className=postgresql.Driver,context=null,postgresql(dot)Driver(at)80aa
> df8]
> -- 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
>  

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ansley, Michael 1999-11-10 07:15:01 RE: [INTERFACES] Re: [HACKERS] CORBA STATUS
Previous Message Rich Shepard 1999-11-10 05:20:40 subscribe