Forums Register Login

how outofMemoryError canbe avoided

+Pie Number of slices to send: Send
Hi,
I have modified and addded certain files related to my project work.When I run bc(buildclean)I recieve the following error followed by warnings.and I could not proceed further..the error msg i recieved when i ran bc on my machine is


Util.java:52: warning: getYear() in java.util.Date has been deprecated
[javac] year.add(currMonth + " " + (cal.getTime().getYear()+19
00));
[javac] ^
[javac]
[javac]
[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac]
[javac] java.lang.OutOfMemoryError
[javac] <<no stack trace available>>

BUILD FAILED..


There are no errors when i run onjdk 1.4.but i reciev this on jdk 1.3.
I tried java -Xmx128m on console but i still recieve this: java -Xms128m
>Error occurred during initialization of VM
>Incompatible initial and maximum heap sizes .server is jboss2 and my machine is windows xp.

Thanks,
Giridhara

{Edit: Please read this.]
[ September 04, 2007: Message edited by: Bear Bibeault ]
[ September 04, 2007: Message edited by: Bear Bibeault ]
+Pie Number of slices to send: Send
It's very unclear to me what your problem is and when it occurs.

The -Xms argument to a JVM has to be less than the -Xmx (or its default). I think the default -Xmx may be 64M, so you are trying to set a minimum of 128MB at the same time as a maximum of 64MB.

If javac is the thing that's running out of memory, you can pass JVM arguments (e.g. -Xms, -Xmx) to it using -J option. Look up the tool docs for javac.
+Pie Number of slices to send: Send
I recieve java.lang.OutOfMemoryError when I run build


I tried java-Xms(minimum size) and Xmx(Maximum size) on console for increasing heapsize memory.. I recieve this errormsg "Error occurred during initialization of VM
Could not reserve enough space for object heap"
+Pie Number of slices to send: Send
Oh, that sounds like your machine really does not have enough virtual memory to serve up the size of heap you requested. How much did you request? Is your machine particularly puny, or particularly heavily-loaded?
+Pie Number of slices to send: Send
virtual memory is 1524 MB...and Heap sizes are
heapSize2031616
heapMaxSize66650112
heapFreeSize1915024.

I dont think my machine is loaded heavily bcause I dont recieve this out of memory error when I run other java applications on my machine .
I m not able to change heapsizes using java-Xms and java-Xmx from my console
+Pie Number of slices to send: Send
 

I recieve java.lang.OutOfMemoryError when I run build



When you say "run build" what exactly does that mean. Are you using an IDE, running ANT task(s) or directly executing the compiler?

Bill
+Pie Number of slices to send: Send
Yes Bill,while running ANT Task to build I m facing this error
[ September 05, 2007: Message edited by: Giri dhar ]
+Pie Number of slices to send: Send
How are you telling the ANT tasks the memory settings to use? Perhaps the process is not using the -Xms etc settings from the command line but is using the default 64mb value.

This query might belong in the ANT forum.

Bill (who uses ANT but doesn't know anything about such details)
this is supposed to be a surprise, but it smells like a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2820 times.
Similar Threads
how outofMemoryError canbe avoided
[%@ attribute name="class" required="false" %] causes failure
ANT Out of Memmory problem
Exceeded maximum depth for nested request dispatches
comparators in display tag
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:56:03.