pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC example is not working with Kaffe 1.0b3
4+ messages / 3 participants
[nested] [flat]

* JDBC example is not working with Kaffe 1.0b3
@ 1998-12-30 08:13 Constantin Teodorescu <teo@flex.ro>
  1998-12-30 19:13 ` Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3 Peter T Mount <peter@retep.org.uk>
  0 siblings, 1 reply; 4+ messages in thread

From: Constantin Teodorescu @ 1998-12-30 08:13 UTC (permalink / raw)
  To: pgsql-interfaces

I tried to run a JDBC example that come with PostgreSQL 6.4.1 using
Kaffe 1.0b3 on a RedHat 5.1 i386 Pentium machine

The example was running fine using jdk 1.1.7 but got the following error
using Kaffe :

java.sql.SQLException: IOError while reading from backend:
java.io.IOException: The backend has broken the connection. Possibly the
action you have attempted has caused it to close.
  at java/lang/Throwable.<init>(37)
  at java/lang/Exception.<init>(21)
  at java/sql/SQLException.<init>(21)
  at java/sql/SQLException.<init>(32)
  at postgresql/PG_Stream.ReceiveIntegerR(237)
  at postgresql/Connection.ReceiveFields(761)
  at postgresql/Connection.ExecSQL(734)
  at postgresql/Statement.execute(259)
  at postgresql/Statement.executeQuery(46)
  at dbt.doexample(46)
  at dbt.<init>(17)
  at dbt.main(62)

The example is creating a table, insert some records in it and try to
query the table.
The program is making ok the table, the records are inserted fine
(checked with psql) but it crashes when trying to query the table.

Does somebody knows what could happening?

Best regards,
-- 
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA



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

* Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3
  1998-12-30 08:13 JDBC example is not working with Kaffe 1.0b3 Constantin Teodorescu <teo@flex.ro>
@ 1998-12-30 19:13 ` Peter T Mount <peter@retep.org.uk>
  1998-12-31 08:26   ` Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3 Constantin Teodorescu <teo@flex.ro>
  0 siblings, 1 reply; 4+ messages in thread

From: Peter T Mount @ 1998-12-30 19:13 UTC (permalink / raw)
  To: Constantin Teodorescu <teo@flex.ro>; +Cc: pgsql-interfaces

On Wed, 30 Dec 1998, Constantin Teodorescu wrote:

> I tried to run a JDBC example that come with PostgreSQL 6.4.1 using
> Kaffe 1.0b3 on a RedHat 5.1 i386 Pentium machine
> 
> The example was running fine using jdk 1.1.7 but got the following error
> using Kaffe :
> 
> java.sql.SQLException: IOError while reading from backend:
> java.io.IOException: The backend has broken the connection. Possibly the
> action you have attempted has caused it to close.
>   at java/lang/Throwable.<init>(37)
>   at java/lang/Exception.<init>(21)
>   at java/sql/SQLException.<init>(21)
>   at java/sql/SQLException.<init>(32)
>   at postgresql/PG_Stream.ReceiveIntegerR(237)
>   at postgresql/Connection.ReceiveFields(761)
>   at postgresql/Connection.ExecSQL(734)
>   at postgresql/Statement.execute(259)
>   at postgresql/Statement.executeQuery(46)
>   at dbt.doexample(46)
>   at dbt.<init>(17)
>   at dbt.main(62)
> 
> The example is creating a table, insert some records in it and try to
> query the table.
> The program is making ok the table, the records are inserted fine
> (checked with psql) but it crashes when trying to query the table.
> 
> Does somebody knows what could happening?

It looks like Kaffe is having problems with it's IO. I have Redhat 5.2
here, so I'll try it's Kaffe, and see if it has the same problem.

Which one of the examples are you using?

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf




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

* Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3
  1998-12-30 08:13 JDBC example is not working with Kaffe 1.0b3 Constantin Teodorescu <teo@flex.ro>
  1998-12-30 19:13 ` Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3 Peter T Mount <peter@retep.org.uk>
@ 1998-12-31 08:26   ` Constantin Teodorescu <teo@flex.ro>
  1998-12-31 09:39     ` Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3 Peter T Mount <peter@taer.maidstone.gov.uk>
  0 siblings, 1 reply; 4+ messages in thread

From: Constantin Teodorescu @ 1998-12-31 08:26 UTC (permalink / raw)
  To: Peter T Mount <peter@retep.org.uk>; +Cc: pgsql-interfaces

Peter T Mount wrote:
> 
> It looks like Kaffe is having problems with it's IO. I have Redhat 5.2
> here, so I'll try it's Kaffe, and see if it has the same problem.
> Which one of the examples are you using?

I am using a simple program derived from example basic.java.

There are no significant changes inside, just the database name, name of
table and fields and maybe their types.
But the main idea is the same. Create a table, put some records inside
and select them.

I am attaching the java source to this e-mail. You should replace
"contabil" database name with your own.
Just a moment please, I want to verify if the original basic example is
working with kaffe.

...

SURPRISE !!!! The original basic.java is working good also with jdk
1.1.7 and with kaffe !!!!
But why it crashes with my program ? This would be more interesting to
see it!

It's 10:30 in Romania. C ya in 1999 !
I wish you  A Happy New Year to all of you !

-- 
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA

Attachments:

dbt.java (text/plain, 1.7K) download import java.io.*; import java.sql.*; import java.text.*; public class dbt { Connection db; Statement st; public dbt(String args[]) throws ClassNotFoundException, FileNotFoundException, IOException, SQLException { Class.forName("postgresql.Driver"); db = DriverManager.getConnection("jdbc:postgresql:contabil", "postgres", "postgres"); st = db.createStatement(); cleanup(); doexample(); //cleanup(); System.out.println("Now closing the connection"); st.close(); db.close(); } public void cleanup() { try { st.executeUpdate("drop table teste"); } catch(Exception ex) { // We ignore any errors here } } public void doexample() throws SQLException { System.out.println("\nRunning tests:"); st.executeUpdate("create table teste (id int2,nume text)"); st.executeUpdate("insert into teste values (1,'vasile')"); st.executeUpdate("insert into teste values (2,'ion')"); st.executeUpdate("insert into teste values (3,'gelu')"); System.out.println("performing a query"); //ResultSet rs = st.executeQuery("select * from teste"); System.out.println("Facem selectul ..."); ResultSet rs = st.executeQuery("select nume from teste"); System.out.println("L-am facut"); if(rs!=null) { while(rs.next()) { //int a = rs.getInt("id"); String b = rs.getString(1); //System.out.println(" id="+a+" nume="+b); System.out.println("nume="+b); } rs.close(); } } public static void main(String args[]) { // Now run the tests try { dbt test = new dbt(args); } catch(Exception ex) { System.err.println("Exception caught.\n"+ex); ex.printStackTrace(); } } }
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3
  1998-12-30 08:13 JDBC example is not working with Kaffe 1.0b3 Constantin Teodorescu <teo@flex.ro>
  1998-12-30 19:13 ` Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3 Peter T Mount <peter@retep.org.uk>
  1998-12-31 08:26   ` Re: [INTERFACES] JDBC example is not working with Kaffe 1.0b3 Constantin Teodorescu <teo@flex.ro>
@ 1998-12-31 09:39     ` Peter T Mount <peter@taer.maidstone.gov.uk>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter T Mount @ 1998-12-31 09:39 UTC (permalink / raw)
  To: Constantin Teodorescu <teo@flex.ro>; +Cc: Peter T Mount <peter@retep.org.uk>; pgsql-interfaces

On Thu, 31 Dec 1998, Constantin Teodorescu wrote:

> Peter T Mount wrote:
> > 
> > It looks like Kaffe is having problems with it's IO. I have Redhat 5.2
> > here, so I'll try it's Kaffe, and see if it has the same problem.
> > Which one of the examples are you using?
> 
> I am using a simple program derived from example basic.java.
> 
> There are no significant changes inside, just the database name, name of
> table and fields and maybe their types.
> But the main idea is the same. Create a table, put some records inside
> and select them.
> 
> I am attaching the java source to this e-mail. You should replace
> "contabil" database name with your own.
> Just a moment please, I want to verify if the original basic example is
> working with kaffe.
> 
> ...
> 
> SURPRISE !!!! The original basic.java is working good also with jdk
> 1.1.7 and with kaffe !!!!
> But why it crashes with my program ? This would be more interesting to
> see it!

I've just briefly read through your program, and it looks ok. When I get
home from work, I'll try it there with kaffe & JDK 1.1 & JDK1.2

> 
> It's 10:30 in Romania. C ya in 1999 !
> I wish you  A Happy New Year to all of you !

Happy New Year, although there's still 14 hours to go here in the UK ;-)

-- 
Peter Mount, IT Section
petermount@it.maidstone.gov.uk
Anything I write here are my own views, and cannot be taken as being the
official words of Maidstone Borough Council





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


end of thread, other threads:[~1998-12-31 09:39 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-12-30 08:13 JDBC example is not working with Kaffe 1.0b3 Constantin Teodorescu <teo@flex.ro>
1998-12-30 19:13 ` Peter T Mount <peter@retep.org.uk>
1998-12-31 08:26   ` Constantin Teodorescu <teo@flex.ro>
1998-12-31 09:39     ` Peter T Mount <peter@taer.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