OutOfMemoryError using bytea

From: "Robert Tyler Retzlaff" <rretzlaf(at)cs(dot)rmit(dot)edu(dot)au>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: OutOfMemoryError using bytea
Date: 2002-01-29 15:04:26
Message-ID: 200201291504.CAA19395@yallara.cs.rmit.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I'm trying to place a ~4MB LargeObject into a bytea type with the
jdbc7.2dev driver but am receiving an OutOfMemory error.

Exception in thread "main" java.lang.OutOfMemoryError:
at java.lang.StringBuffer.expandCapacity(StringBuffer.java:202)
at java.lang.StringBuffer.append(StringBuffer.java:496)
at org.postgresql.util.PGbytea.toPGString(PGbytea.java:83)
at org.postgresql.jdbc2.PreparedStatement.setBytes(PreparedStatement.java:320)
at org.postgresql.jdbc2.PreparedStatement.setBinaryStream(PreparedStatement.java:577)
at BlobTest.store(BlobTest.java:39)
at BlobTest.main(BlobTest.java:90)

Is there any way to deal with this?

Thanks.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tony DeWitt 2002-01-29 15:48:44 Re: JDBC batching
Previous Message runway runable 2002-01-29 05:30:02 The question of jdbc