As I mentioned there, soapUI is a very useful tool and that is the reason I use it very often.
While using it recently, I came across an issue because of which I couldn’t launch it on my machine!
Clicking on the soapUI.exe, I got soapUI JVM maximum heap size (-Xmx) error message which read something like this.
The JVM could not be started. The maximum heap size (-Xmx) might be too large or an antivirus or firmware tool could block the execution.
I tried different things and while looking for a solution on the internet, found a rather simple solution to this issue which I wanted to share with you.
Before I jump on to the fix for this issue, here is a brief on what exactly is ‘maximum heap size’
What does Heap Size in Java mean?
When any Java program launches on your machine, Java Virtual Machine (or JVM) takes some memory from the Operating System.
Then, for as long as the program runs, JVM uses this allocated memory for its operation and a part of this memory is termed Java Heap Memory.
So, when ever a new object is created for a Java Application (which happens in this case when you launch soapUI.exe!), it is allocated memory from Heap and when object dies or garbage is collected, memory goes back to Heap.
-Xms denotes starting size of heap while -Xmx denotes maximum size of heap in Java.
How to fix soapUI JVM maximum heap size issue?
Java maximum heap size (-Xmx) error occurs because Soap UI tries to fetch the specified amount of memory in form of single block which is not available and hence, this error.
Now that you understand what Java maximum heap memory size is and what is the reason behind this error in soapUI, let’s jump on to the solution to this problem!
1. Navigate to “C:\Program Files\SmartBear\soapUI-x.x.x\bin” on your system and look for the file soapUI-x.x.x.vmoptions.
x.x.x refers to the soapUI version you are using!
In my case, this is how the navigation path is (on Windows 7). But, it won’t make much of a difference if you are using any other version of Windows.
2. Now, right-click on this file and open it in any text editor – Notepad or Notepad++. Personally, I prefer Notepad++; we will discuss the reasons in some future post!
Once you open it, below is how the contents of this file looks like:
-Dsoapui.home=C:\Program Files (x86)\SmartBear\soapUI-4.5.2/bin
-Dsoapui.ext.libraries=C:\Program Files (x86)\SmartBear\soapUI-4.5.2/bin/ext
-Dsoapui.ext.listeners=C:\Program Files (x86)\SmartBear\soapUI-4.5.2/bin/listeners
-Dsoapui.ext.actions=C:\Program Files (x86)\SmartBear\soapUI-4.5.2/bin/actions
-Dwsi.dir=C:\Program Files (x86)\SmartBear\soapUI-4.5.2/wsi-test-tools
-Djava.library.path=C:\Program Files (x86)\SmartBear\soapUI-4.5.2/bin
-Djxbrowser.xulrunner.dir=C:\Program Files (x86)\SmartBear\soapUI-4.5.2\.JxBrowser
In this file, change the -Xmx to a smaller value like 512m. If it still doesn’t work, change it change it to an even lesser value to suit your requirement.
3. Now save the file soapUI-x.x.x.vmoptions and re-launch soapUI.exe.
Update (21 Sep 2015): One of our readers (Afrin) faced the same issue with SeeTestManual which he reported in the comment below!
SeeTestManual by Experitest is a manual testing tool for iOS, Android, WindowsPhone and Blackberry.
To fix JVM could not be started – maximum heap size memory issue in SeeTestManual, you can follow the simple steps as described below to increase JVM memory size.
1. Create a new .txt file and add the text “-Xmx<SIZE>” in it.
[For example, to increase the memory to 1024m, use “-Xmx1024m” (this will set the memory value to 1024mb)]
2. Save the file with the name as studio.vmoptions. When trying to save it, you will be prompted to confirm the file extension name – Approve it!
3. Place the file into the folder where you installed SeeTestManual (The same directory where studio.exe is located)
4. Relaunch SeeTestManual.
Please make sure that SeeTestManual is closed when making these changes.
I hope this quick fix resolves the soapUI JVM maximum heap size issue for you and helps you get back to testing using soapUI!
If you are still unable to resolve this issue, get in touch with me and I will be happy to help you.
Don’t forget to follow QST official Facebook page – a place where testers get together to help each other.
Also, you can subscribe to my free newsletter to make sure you do not miss any future updates from QuickSoftwareTesting!
Latest posts by Amandeep Singh (see all)
- 40+ Super Useful Chrome Extensions for Software Testing [2017 Update] - February 24, 2016
- Writing Test Cases for Brochure/Catalog Based Websites [Checklist] - December 29, 2015
- Latest trends in Software Testing 2015 – How the World Tests? - November 19, 2015