pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PG6.5 + JDBC + Linux + Kaffe
6+ messages / 3 participants
[nested] [flat]

* PG6.5 + JDBC + Linux + Kaffe
@ 1999-06-17 23:50  Daniele Orlandi <daniele@orlandi.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniele Orlandi @ 1999-06-17 23:50 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org


Hi,

I downloaded the 6.5 JDBC JAR for 1.1.x, unzipped with unzip, and run a little
test application and this is the result:

[root@etabeta idsj]# java aucserver
java.lang.ArrayIndexOutOfBoundsException
        at java.text.MessageFormat.format(MessageFormat.java:238)
        at java.text.MessageFormat.format(MessageFormat.java:230)
        at postgresql.util.PSQLException.translate(PSQLException.java:83)
        at postgresql.util.PSQLException.<init>(PSQLException.java:45)
        at postgresql.Driver.connect(Driver.java:106)
        at java.sql.DriverManager.getConnection(DriverManager.java:61)
        at java.sql.DriverManager.getConnection(DriverManager.java:49)
        at aucserver.main(aucserver.java:41)

I'm using kaffe on linux 2.2.9, Redhat 6.0:

[root@etabeta idsj]# javac -version
Pizza v0.39g, 15-August-98, Copyright (c) 1996-98 Martin Odersky.

[root@etabeta idsj]# java -version
Kaffe Virtual Machine
Copyright (c) 1996-1999
Transvirtual Technologies, Inc.  All rights reserved
Engine: Just-in-time   Version: 1.0b4   Java Version: 1.1

The test application does just:

Class.forName("postgresql.Driver");
Connection db=DriverManager.getConnection("jdbc:postgresql://xtnet",
"xxxxx","xxxx");

Any hint ?

Thanks in advance.

-- 
 Daniele

-------------------------------------------------------------------------------
 Daniele Orlandi - Utility Line Italia - http://www.orlandi.com
 Via Mezzera 29/A - 20030 - Seveso (MI) - Italy
-------------------------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* RE: [INTERFACES] PG6.5 + JDBC + Linux + Kaffe
@ 1999-06-21 10:12  Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 6+ messages in thread

From: Peter Mount @ 1999-06-21 10:12 UTC (permalink / raw)
  To: 'Daniele Orlandi' <daniele@orlandi.com>; pgsql-interfaces@hub.org

Two things:

1) You shouldn't need to unzip the archive, but simply place the
postgresql.jar (or jdbc6.5.jar) file in the classpath.

2) Your JVM (Kaffe) isn't returning a version string that it can handle,
so the driver doesn't know which version to load (JDBC1 or JDBC2). You
will need to run it something like this:

	java -Djava.version=1.2 aucserver

or
	java -Djava.version=1.1 aucserver

Hope that helps

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.

-----Original Message-----
From: Daniele Orlandi [mailto:daniele@orlandi.com]
Sent: Friday, June 18, 1999 12:51 AM
To: pgsql-interfaces@hub.org
Subject: [INTERFACES] PG6.5 + JDBC + Linux + Kaffe



Hi,

I downloaded the 6.5 JDBC JAR for 1.1.x, unzipped with unzip, and run a
little
test application and this is the result:

[root@etabeta idsj]# java aucserver
java.lang.ArrayIndexOutOfBoundsException
        at java.text.MessageFormat.format(MessageFormat.java:238)
        at java.text.MessageFormat.format(MessageFormat.java:230)
        at
postgresql.util.PSQLException.translate(PSQLException.java:83)
        at postgresql.util.PSQLException.<init>(PSQLException.java:45)
        at postgresql.Driver.connect(Driver.java:106)
        at java.sql.DriverManager.getConnection(DriverManager.java:61)
        at java.sql.DriverManager.getConnection(DriverManager.java:49)
        at aucserver.main(aucserver.java:41)

I'm using kaffe on linux 2.2.9, Redhat 6.0:

[root@etabeta idsj]# javac -version
Pizza v0.39g, 15-August-98, Copyright (c) 1996-98 Martin Odersky.

[root@etabeta idsj]# java -version
Kaffe Virtual Machine
Copyright (c) 1996-1999
Transvirtual Technologies, Inc.  All rights reserved
Engine: Just-in-time   Version: 1.0b4   Java Version: 1.1

The test application does just:

Class.forName("postgresql.Driver");
Connection db=DriverManager.getConnection("jdbc:postgresql://xtnet",
"xxxxx","xxxx");

Any hint ?

Thanks in advance.

-- 
 Daniele

------------------------------------------------------------------------
-------
 Daniele Orlandi - Utility Line Italia - http://www.orlandi.com
 Via Mezzera 29/A - 20030 - Seveso (MI) - Italy
------------------------------------------------------------------------
-------



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* RE: PG6.5 + JDBC + Linux + Kaffe
@ 1999-06-23 17:58  Jon Nielsen <jonfn@image.dk>
  0 siblings, 0 replies; 6+ messages in thread

From: Jon Nielsen @ 1999-06-23 17:58 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

Hi Daniele,

Your example does not work for two reasons:

1) 
Your call to DriverManager is incorrect. 
The correct form is either
  Connection db = DriverManager.getConnection("jdbc:postgresql:DATABASE","USER","PASSWORD");
or 
  Connection db = DriverManager.getConnection("jdbc:postgresql://MACHINE/DATABASE","USER","PASSWORD");


2)
There is a bug in the 'error.properties' file which causes the JDBC driver not to return the correct error messages.

You can fix this yourself, by changing {1} to {0}, and {2} to {1} and so on. Then you should get the correct error message.


Hope that helps you

Jon Nielsen
jonfn@image.dk

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* RE: PG6.5 + JDBC + Linux + Kaffe
@ 1999-06-23 18:01  Jon Nielsen <jonfn@image.dk>
  0 siblings, 0 replies; 6+ messages in thread

From: Jon Nielsen @ 1999-06-23 18:01 UTC (permalink / raw)
  To: pgsql-interfaces

Hi Daniele,

Your example does not work for two reasons:

1) 
Your call to DriverManager is incorrect. 
The correct form is either
  Connection db = DriverManager.getConnection("jdbc:postgresql:DATABASE","USER","PASSWORD");
or 
  Connection db = DriverManager.getConnection("jdbc:postgresql://MACHINE/DATABASE","USER","PASSWORD");


2)
There is a bug in the 'error.properties' file which causes the JDBC driver not to return the correct error messages.

You can fix this yourself, by changing {1} to {0}, and {2} to {1} and so on. Then you should get the correct error message.


Hope that helps you

Jon Nielsen
jonfn@image.dk

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* RE: PG6.5 + JDBC + Linux + Kaffe
@ 1999-06-23 18:13  Jon Nielsen <jonfn@image.dk>
  0 siblings, 0 replies; 6+ messages in thread

From: Jon Nielsen @ 1999-06-23 18:13 UTC (permalink / raw)
  To: pgsql-interfaces

Hi Daniele,

Your example does not work for two reasons:

1) 
Your call to DriverManager is incorrect. 
The correct form is either
  Connection db = DriverManager.getConnection("jdbc:postgresql:DATABASE","USER","PASSWORD");
or 
  Connection db = DriverManager.getConnection("jdbc:postgresql://MACHINE/DATABASE","USER","PASSWORD");


2)
There is a bug in the 'error.properties' file which causes the JDBC driver not to return the correct error messages.

You can fix this yourself, by changing {1} to {0}, and {2} to {1} and so on. Then you should get the correct error message.


Hope that helps you

Jon Nielsen
jonfn@image.dk

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* RE: [INTERFACES] RE: PG6.5 + JDBC + Linux + Kaffe
@ 1999-06-24 07:43  Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 6+ messages in thread

From: Peter Mount @ 1999-06-24 07:43 UTC (permalink / raw)
  To: pgsql-interfaces

I committed the fix for error.properties into cvs a couple of nights
ago.
 
Peter
 

-- 
Peter Mount 
Enterprise Support 
Maidstone Borough Council 
Any views stated are my own, and not those of Maidstone Borough Council.


-----Original Message-----
From: Jon Nielsen [mailto:jonfn@image.dk]
Sent: Wednesday, June 23, 1999 7:13 PM
To: pgsql-interfaces@postgreSQL.org
Subject: [INTERFACES] RE: PG6.5 + JDBC + Linux + Kaffe




Hi Daniele,
 
Your example does not work for two reasons:
 
1) 
Your call to DriverManager is incorrect. 
The correct form is either
  Connection db =
DriverManager.getConnection("jdbc:postgresql:DATABASE","USER","PASSWORD"
);
or 

  Connection db =
DriverManager.getConnection("jdbc:postgresql://MACHINE/DATABASE","USER",
"PASSWORD");
 
 
2)
There is a bug in the 'error.properties' file which causes the JDBC
driver not to return the correct error messages.
 
You can fix this yourself, by changing {1} to {0}, and {2} to {1} and so
on. Then you should get the correct error message.
 
 
Hope that helps you
 
Jon Nielsen
jonfn@image.dk





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~1999-06-24 07:43 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-17 23:50 PG6.5 + JDBC + Linux + Kaffe Daniele Orlandi <daniele@orlandi.com>
1999-06-21 10:12 RE: [INTERFACES] PG6.5 + JDBC + Linux + Kaffe Peter Mount <petermount@it.maidstone.gov.uk>
1999-06-23 17:58 RE: PG6.5 + JDBC + Linux + Kaffe Jon Nielsen <jonfn@image.dk>
1999-06-23 18:01 RE: PG6.5 + JDBC + Linux + Kaffe Jon Nielsen <jonfn@image.dk>
1999-06-23 18:13 RE: PG6.5 + JDBC + Linux + Kaffe Jon Nielsen <jonfn@image.dk>
1999-06-24 07:43 RE: [INTERFACES] RE: PG6.5 + JDBC + Linux + Kaffe Peter Mount <petermount@it.maidstone.gov.uk>

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