• Post Reply Bookmark Topic Watch Topic
  • New Topic

Out of memory Java Heap size  RSS feed

 
Patrick Thurman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry I am new here. I don't know about code tags. This is the section of code that causes the problem. The code reads an LDAP on our portal and displays the results in a swing jTextArea. It works fine until a large amount of data is returned from the LDAP. I found the same error on this site and I used there solution for solving the memory problem by placing the code for the button all within a new thread. It did not help. That is why I sent all the code.
http://www.coderanch.com/t/375269/java/java/Exception-thread-AWT-EventQueue-java


[ June 02, 2008: Message edited by: Patrick Thurman ]
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please:
- UseCodeTags. It makes reading so much easier.
- IsolateTheProblem. The problem occurs when jbutton1 is pressed. Therefore, only the code inside "jButton1ActionPerformed" is needed.
- SearchFirst. If you had done that you would have at least found out how to solve the problem, although it may be temporary.

However, some times out-of-memory errors can be solved by better coding. Could you please post only the code in "jButton1ActionPerformed", with code tags and proper formatting, so we can see what it is actually doing? Perhaps we can solve the errors altogether, and not by just letting Java use more memory.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please remove the real sounding network locations such as String ROOT_PASSWORD = "########"; and replace all account names an so on like I have it obliterated here.

First off, you have two places in you code marked // TODO so on first glance, you have not done all the work needed and are trying to get going. If that is correct, then I would look around the call to new Thread() and try to get us an explaination from whoever supplied you this code what the code is supposed to do. It is overly difficult to look for the flaw if we do not know the path the code is trying to chart.

There is an awful lot of bloat here that does not have anything to do with an out of memory exception, also try to learn how to use the code tags.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!