From: | Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk> |
---|---|
To: | "'t-ishii(at)sra(dot)co(dot)jp'" <t-ishii(at)sra(dot)co(dot)jp>, Ellen Spertus <spertus(at)ella(dot)mills(dot)edu> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | RE: [INTERFACES] NullPointerException in blobtest (JDBC) |
Date: | 1999-06-21 07:54:30 |
Message-ID: | 1B3D5E532D18D311861A00600865478C9F9F@exchange1.nt.maidstone.gov.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Looks ok, except you should use db.commit() (which Heroth has already
stated) ;-)
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Tatsuo Ishii [mailto:t-ishii(at)sra(dot)co(dot)jp]
Sent: Sunday, June 20, 1999 6:42 AM
To: Ellen Spertus
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] NullPointerException in blobtest (JDBC)
> I am getting a NullPointerException when running blobtest. I am using
the latest version of everything:
>
> - postgresql 6.5
> - jdk 1.2
> - jdbc6.5-1.2
> - the version of blobtest.java that came with postgresql 6.5
> - OS: RH6.0
> - x86 (AMD K6)
[snip]
6.5 Large Objects requires each access to LO being inside a
transaction. Try following patches. Peter, can you check them?
---
Tatsuo Ishii
----------------------------------------------------------
*** blobtest.java~ Tue Jan 13 11:19:16 1998
--- blobtest.java Sun Jun 20 14:10:59 1999
***************
*** 40,45 ****
--- 40,46 ----
// Connect to database
System.out.println("Connecting to Database URL = " + url);
db = DriverManager.getConnection(url, usr, pwd);
+ db.setAutoCommit(false);
System.out.println("Connected...Now creating a statement");
s = db.createStatement();
***************
*** 52,57 ****
--- 53,60 ----
// Now run tests using JDBC methods
//jdbcapi(db,s);
+ s.executeUpdate("commit");
+
// Finally close the database
System.out.println("Now closing the connection");
s.close();
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Mount | 1999-06-21 10:12:37 | RE: [INTERFACES] PG6.5 + JDBC + Linux + Kaffe |
Previous Message | spertus | 1999-06-20 23:52:33 | Re: [INTERFACES] NullPointerException in blobtest (JDBC) |