- This topic has 10 replies, 4 voices, and was last updated 17 years ago by hamadonna.
-
AuthorPosts
-
jcorbin4607MemberI am trying to generate my EJB interfaces using the built in XDoclet support and keep running out of memory. I changed from Dynamic XDoclet processing MyEclipseIDE to the manual mode that gives me access to the xdoclet build xml. I tried setting an environment variable, ANT_OPTS=-Xmx640m, but the built in ANT tool doesn’t seem to recognize it.
Anybody have some suggestions to get around this problem other than generating the interfaces for my EJBs completely outside of MyEclipseIDE???
Thanks,
J.D.
Riyad KallaMemberJD,
<Post revised>If you have no giving more memory to Eclipse after installing MyEclipse, then I am not surprised you are running into OOME. MyEclipse does require more memory especially if you are running the XDoclet processor than the default heap size can provide it. Please try and adjust your shortcut used to start MyEclipse like so:
c:\eclipse\eclipse.exe -vmargs -Xms128m -Xmx256m
This is generally a good thing to do.
jcorbin4607MemberI will give those settings a try. I checked the default settings and they were -vmargs -Xmx512m.
Riyad KallaMemberI checked the default settings and they were -vmargs -Xmx512m.
That should be MORE than enough, if XDoclet is still giving you OOME try running the MyEclipse > Garbage Collector and see what stats it spits out, do you infact see 512m being allocated for Eclipse?
jcorbin4607Member@support-rkalla wrote:
I checked the default settings and they were -vmargs -Xmx512m.
That should be MORE than enough, if XDoclet is still giving you OOME try running the MyEclipse > Garbage Collector and see what stats it spits out, do you infact see 512m being allocated for Eclipse?
Here are the numbers after garbage collection (I bumped the Xms up to 256m from 128m and left the Xmx at 512m)
Maximum Allowable Memory Size: 508.062
Memory Allocated: 254.125
Memory Used: 15.155
Memory Available: 238.97
Riyad KallaMemberHow big is your xdoclet file? How long does it take to turn?
TIP: To see the generated file, go to Project properties > MyEclipse-XDoclet > Build type, and turn off the ‘dynamic building’ so it will spit out a xml file foryou to look at in your project root dir.
jcorbin4607MemberThe generated xdoclet build file is 3.5K. Here is the error I continue to get when trying to generate the interfaces. I have my vmargs bumped to Xmx=640m and Xms=256m. From the information below, it seems that the ANT process does not have enough memory to run. I see the same thing when I run the xdoclet build outside of the eclipse JVM and the only way to resolve it is to allocate more memory to the Ant process by specifying the ANT_OPTS setting. I need to be able to do this in MyEclipseIDE.
Buildfile: C:\cvs_base\workspace\LightSpeedEJB\xdoclet-build.xml
N10004:
[ejbdoclet] (XDocletMain.start 47 ) Running <localinterface/>
[ejbdoclet] null
[ejbdoclet] ParameterImpl instances: 20
[ejbdoclet] MethodImpl instances: 4214
[ejbdoclet] ConstructorImpl instances: 284
[ejbdoclet] SimpleNode instances: 0
[ejbdoclet] SourceClass instances: 260
[ejbdoclet] XDoc instances: 0
[ejbdoclet] DefaultXTag instances: 0
[ejbdoclet] BinaryClass instances: 80
[ejbdoclet] UnknownClass instances: 134
[ejbdoclet] Total memory: 63
[ejbdoclet] Free memory: 0
[ejbdoclet] Try to increase heap size. Can be done by defining ANT_OPTS=-Xmx640m
[ejbdoclet] See the JDK tooldocs.
BUILD FAILED: C:\cvs_base\workspace\LightSpeedEJB\xdoclet-build.xml:37: null
Total time: 14 seconds
GregMemberTry adding more memory to the xdoclet generation by using the following steps.
1)Set xdoclet build policy to manual
2) Right click the xdoclet-build.xml file in your project and choose Run > Ant Build …
3)Go to the JRE tab on the ant build property window.
4) Add your memory options to the VM arugments-Xmx256M
5) Hit Run
The xdoclet generation does execute in a new jvm process so this should pass the -Xmx256M arg to the new jvm when you run xdoclet.
jcorbin4607MemberThat worked…I had to specify -Xmx512m but it successfully generated all the interfaces…I don’t know where it put them but that is another problem I can manage.
Thanks for the help.
J.D.
Riyad KallaMemberI had to specify -Xmx512m
Good god, that’s a greedy build file…
hamadonnaMemberThis message has not been recovered.
-
AuthorPosts