I'm using wsimport in Java 1.6 (i.e. build 1.6.0-b105) on Windows XP 5.1 and I'm getting a out of memory exception. I used to JConsole and it seems wsimport process is maxing out at 64 MB. How can I increase the heap memory for wsimport?
Thanks,
I'm using wsimport in Java 1.6 (i.e. build 1.6.0-b105) on Windows XP 5.1 and I'm getting a out of memory exception. I used to JConsole and it seems wsimport process is maxing out at 64 MB. How can I increase the heap memory for wsimport?
Thanks,
wsimport accepts JVM arguments through the WSIMPORT_OPTS environment variable. So on Windows, try running "set WSIMPORT_OPTS=-Xmx512M" on the command-line before running wsimport to give the JVM 512Mb of heap.
I figured to get past this issue. The easiest way is to use Netbeans (I'm using v6.8). Replace the default memory settings in Netbeans.conf under /etc directory like this: -J-Xms768m -J-Xmx768m -J-XX:PermSize=128m and follow the usual way to create Web Service Client following JAX WS in Netbeans. From JConsole, I see that loading ~18,500 classes overall in the memory tends to use between ~400MB to ~650MB. The # of classes generated based on my WSDL/Schemas are ~1500 classes. Hope this helps for someone running into a similar issue.
If you're on a sufficiently modern JDK, you can use the -Xnocompile
option and then supply the javac
process with additional memory the usual way. (Try wsimport --help
to see if your version supports the flag.)