db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J.Engl...@bton.ac.uk
Subject Re: java.lang.OutOfMemoryError
Date Thu, 14 Feb 2008 12:30:49 GMT
Tim Halloran wrote:

> Is this in a program?  What does the JDBC code look like?  You can try
> increasing its memory using -Xmx1200m or some such to the JVM.

It's a servlet application (using Jetty as the container and embedded
Derby). The JDBC is as follows:

   PreparedStatement stat = database.getConnection().prepareStatement(
   ResultSet res = stat.executeQuery();

Generating the ResultSet takes a minute or so.

> Do not catch Throwable, this pretty much never a good idea.  What could
 > you do?

I know, but I want to at least try to write a console message before
cave closing time if something bad happens.

  John English              | mailto:je@brighton.ac.uk
  Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
  School of Computing & MIS | "Those who don't know their history
  University of Brighton    |  are condemned to relive it" (Santayana)

View raw message