facebook

Memory Issues with XDoclet and MyEclipseIDE

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #224218 Reply

    jcorbin4607
    Member

    I 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.

    #224221 Reply

    Riyad Kalla
    Member

    JD,
    <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.

    #224224 Reply

    jcorbin4607
    Member

    I will give those settings a try. I checked the default settings and they were -vmargs -Xmx512m.

    #224225 Reply

    Riyad Kalla
    Member

    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?

    #224226 Reply

    jcorbin4607
    Member

    @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

    #224227 Reply

    Riyad Kalla
    Member

    How 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.

    #224278 Reply

    jcorbin4607
    Member

    The 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

    #224290 Reply

    Greg
    Member

    Try 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.

    #224308 Reply

    jcorbin4607
    Member

    That 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.

    #224314 Reply

    Riyad Kalla
    Member

    I had to specify -Xmx512m

    Good god, that’s a greedy build file…

    #277900 Reply

    hamadonna
    Member

    This message has not been recovered.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Memory Issues with XDoclet and MyEclipseIDE

You must be logged in to post in the forum log in