Forum Discussion

Siva_Yelaswarap's avatar
Siva_Yelaswarap
Occasional Contributor
17 years ago

java.lang.OutOfMemoryException:Java heap space

Hi All,

I am getting the java.lang.OutOfMemoryException:Java heap space error while saving my soap ui project.
I am having around 80 WSDLS for which we have around 20 test cases for each WSDL in my project.
When i made some changes and tried to save project i see the error.
Please help me to overcome this error.

Thanks,
Siva

7 Replies

  • Hi Siva,


    Try changing soapui.bat (or soapui.sh depending on your OS) and giving Java VM more memory by increasing the value in JAVA_OPTS
    environment variable next to -Xmx options.
    Let us know if made the heap space error go away.


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla
  • Siva_Yelaswarap's avatar
    Siva_Yelaswarap
    Occasional Contributor
    Hi Nenad

    Thanks for the replay,I have done that and that's working great, but is there any way i could set this parameter on run time?

    Thanks,
    Siva.
  • Hello,

    These parameters are passed to the Java VM upon startup and unfortunately cannot be changed once started.

    Regards,
    Dain
    eviware support

  • Hi Siva,


    Try changing soapui.bat (or soapui.sh depending on your OS) and giving Java VM more memory by increasing the value in JAVA_OPTS
    environment variable next to -Xmx options.
    Let us know if made the heap space error go away.


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla


    Please specify clearly how to change the Soapui.bat file

    where to change  JAVA_OPTS
    environment variable
  • Hello,

    In soapui.bat find:

    ...
    rem JVM parameters, modify as appropriate

    set JAVA_OPTS=-Xms128m -Xmx256m -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%"

    if "%SOAPUI_HOME%" == "" goto START
        set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.libraries="%SOAPUI_HOME%ext"
        set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.listeners="%SOAPUI_HOME%listeners"
    ...


    In line :

    ...
    set JAVA_OPTS=-Xms128m -Xmx256m -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%"
    ...


    To give more memory to soapui change -Xmx256m to -Xmx512m, for example. This is giving 512M to soapiu java process.

    Let me know does this helps,
    robert