• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

SQL Exception

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am facing an starnge problem.
My psuedo code,

1. A Query to Retreive the Records satisfying particular condition.
2. For each record retreived above i have a for loop to itreate it and do the following operations.
3. Inside For loop-
Write a prepared statement and execute it to get users associated with that which is multiple.
4. Based on the users got i build a comlplex query with the values retrived in above process and execute it to get the resultset.
5.I store the values in arraylist
6. Repeat the above process unitill all the records are handled.

If the no. of records are less, its working fine. But it exceeds around 60 i get the following exception-

com.ibm.db2.jcc.b.SqlException: Not enough storage is available in the application heap to process the statement.


Can any one suggest a solution to overcome this problem.

Thanks in advance.

Regards,
Arul.
 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is just a wild guess, but it sounds like either cursor problems, an unanticipated set of conditions, or unclosed resources. Have you placed printlns strategically? ... especially with different counts?

~Bill
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also check your queries and make sure you are not executing a cartesian join on two huge tables. It maybe that the resulting object pushed as return from the db to your java object is too big and java cannot store it.

Regards,
george
 
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!