Out of Memory exception

Our application is currently using java version 1.2.2. Recently, we have experienced Out Of Memory exception and I believe this occured as they were multiple threads running at this time using buffer space. Is this a known issue. Can this be resolved after migrating to Java 1.4? Please suggest.Thanks for your help.
g46905Asked:
Who is Participating?
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
For development, though, WSAD 5.1 does not support Java 5 even if you try to add it as a JRE. The best bet is to use Eclipse.
0
 
JavatmConnect With a Mentor Commented:
1.4 can be a solution or you can try :

increasing the amount of memory available to the VM using -Xmx command line option
eg. to give it 512mb

java -Xmx512m .... if that is availabel in 1.2 if not try 1.4 if you experience the same problem
then increase the amount of memory of your application using the above solution.
0
 
hoomanvCommented:
for 1.2

java -Xms32m -Xmx128m

Xms: the initial amount of memory allocated for your program
Xmx: the maximum amount of memory that can be allocated for your program
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
objectsConnect With a Mentor Commented:
OOM error occurs when the VM cannot fulfil a request for more memory.
Ifd your application shouldn't require an excessive amount of memory then it could be caused by a memory leak.
Make sure you remove any references to variables when they are no longer needed.
You could use a profiler to determine where your memory was being used.
0
 
sciuriwareCommented:
g46905, if you have run this application for some time and suddenly one day this happens,
may be only the use of it has grown.
If you never applied the -Xmx  arguments, you are still running with a maximum of 64Mb.
So may be nothing is wrong, just set it to -Xmx80m.
If that runs ok, you know it: things grow a bit.
Be prepared that one day 80Mb is not enough, so keep an eye on it.

You can speed up things by specifying:
                             -Xms64m -Xmx80m
which gives you 64Mb at once, because you know you need it, growing permitted to 80.

;JOOP!
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> Can this be resolved after migrating to Java 1.4?

If you have to migrate then why not Java 5 ;) ?
0
 
g46905Author Commented:
I am currently using WSAD 5.1 and I believe this contains the required compiler to migrate to 1.5.Can a new compiler be added to WSAD?

Thanks
0
 
Mayank SAssociate Director - Product EngineeringCommented:
I'm not sure because I don't have WSAD with me right now and when I worked with it, I worked with only Java 1.4. I'm not sure if WSAD 5 will support Java 5.
0
 
sciuriwareCommented:
Agreed.

;JOOP!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.