|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Java.lang.OutofMemory.Exception error
Hey Guys, Recently i was trying to convert a file to my mysql database. When i was trying to convert the file which was around 150 mb in size, it showed me an error message that "Java.lang.Out of Memory.Exception" on my desktop screen. I don't but its not allowing me to convert that particular file to my mysql database. Can any body help me out to get rid of the above problem? Any kind of help on the above issue would be appreciated. Thanks. |
#2
| |||
| |||
Re: Java.lang.OutofMemory.Exception error
The JVM places an upper limit on the amount of memory available to the current process in order to prevent runaway processes gobbling system resources and making the machine grind to a halt. When reading or writing large spreadsheets, the JVM may require more memory than has been allocated to the JVM by default.This normally manifests itself as a java.lang.OutOfMemory exception. By default, each workbook allocates 5MB when created and allocates more memory in 5MB increments. These values can be changed by using class WorkbookSettings. Often the OutOfMemory exception can be removed by lowering these values (note that performance may suffer as a result). Alternatively, you can allocate more memory to the JVM using the -Xms and -Xmx options; e.g., to allocate an initial heap size of 10 MB, with 100 MB as the upper bound, you should start the JVM like this:java -Xms10m -Xmx100m MyClass In order to allocate more memory in this manner to servlets/JSPs, consult the help documentation for the Web Application Server. |
#3
| |||
| |||
Re: Java.lang.OutofMemory.Exception error
Hey you can try have a look at your code, there could be a memory leek. Try to set variables to null, after sometime it will clear the memory. You can also look out for some loops in you code, which may also consume a lot of memory. |
#4
| |||
| |||
Re: Java.lang.OutofMemory.Exception error
Most JVMs allocate memory on the heap for almost everything, except for reflective data. That is put in a separate location which is a section of the heap that is reserved for permanent generation. This gets easily filled up when you dynamically load an unload classes, or have a large number of classes. I simply added the following options to the java executable and all my worries were gone:- Quote:
Quote:
![]() |
![]() |
|
Tags: error, java, memory |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error “Uncaught exception: java.lang.IndexOutofBoundsException” while accessing the SMS inbox in BB torch | Emmeric | Portable Devices | 3 | 19-02-2011 03:20 AM |
Exception in thread "main" java.lang.NoClassDefFoundError: [ClassName] | Icarusul | Software Development | 5 | 20-10-2010 12:44 AM |
Blackberry Pearl 8100- Uncaught Exception: java.lang.IllegalArgumentException | Angelica Maria | Portable Devices | 4 | 08-04-2010 12:37 PM |
Error - java.lang.NumberFormatException | Vodka | Software Development | 5 | 05-03-2010 11:57 AM |
Error message: Uncaught Exception java.lang.error | Rum | Portable Devices | 5 | 06-01-2010 01:59 PM |