This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 75967

Summary: Out of memory when dealing with big wsdl files
Product: webservices Reporter: Lukas Jungmann <jungi>
Component: JAX-WSAssignee: Milan Kuchtiak <mkuchtiak>
Severity: blocker CC: abadea, issues, jtulach
Priority: P3 Keywords: PERFORMANCE, RELNOTE
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: JVM Options in Edit WS Attributes dialog

Description Lukas Jungmann 2006-05-05 09:24:01 UTC
When one works with big wsld files (don't know the limit but wsdl for e-bay
websvc is big enough - ~2,3MB) ide ends up with OutOfMemoryError and becomes
unusable for a while - it can occur durring creation of ws client or ws from wsdl.

Workaround for this is to edit "-J-Xmx128m" starup parameter in
$NB_HOME/etc/netbeans.conf (changing it to "-J-Xmx256m" seems to be enough)
Comment 1 Milan Kuchtiak 2006-05-05 09:49:45 UTC
Any ideas how to deal with this ?
Comment 2 Lukas Jungmann 2006-05-05 10:05:29 UTC
I have 3 ideas:

-mention it in relnotes - done for now

-put some comment to $NB_HOME/etc/netbeans.conf - something like "if you're
working with big wsdl files then you should set -J-Xmx256m instead of -J-Xmx128m"

-make -J-Xmx256m option default in netbeans.conf - would be probably the best,
because other parts of the IDE could benefit from this, BUT this would have an
impact on the minimum hardware configuration the IDE can be run on (at least
this is what I've heart from a guy from performance team)
Comment 3 Martin Grebac 2006-05-05 12:02:53 UTC
Or check the size of the file in the dialog (or retriever) and show the warning.
Comment 4 Lukas Jungmann 2006-05-18 13:03:54 UTC
that would be enough for 5.5
Comment 5 Milan Kuchtiak 2006-09-05 15:32:32 UTC
Meanwhile, I put the comment to netbeans.conf :

diff -r1. -r1.
< #
< # if you're processing large wsdl files(e.g. when creating or consuming web
services) you should set -J-Xmx256m instead of -J-Xmx128m

could it be possible to start Netbeans5.5 defaultly with -J-Xmx256m ?
Comment 6 _ rkubacki 2006-09-06 08:13:48 UTC
Did anyone try to analyze why it actually needs so much memory?

-1 to increase default max heap size. So far there is no reasonable
justification why this is really neceseary.

I can come with many examples where our IDE needs higher -Xmx than default so
mentioning this one special case in netbeans.conf is not too good approach IMO.
Section in release notes can be fine.

Implementation of Martin's idea is likely to be fragile (it is clear how large
part of heap can be used for your task and you have to have some estimation what
you will need).
Comment 7 _ rkubacki 2006-09-06 09:19:58 UTC
You did not fix anything. Perhaps you intent to close this as wontfix?
Comment 8 Milan Kuchtiak 2006-09-06 09:24:50 UTC
2 of three ideas were implemented so the FIXED was proper word.

The real measurement was not provided.
There are real wsdl files that results in OutOfMemoryError.

It's difficult to implement Martin's idea:
- there are usually more files than one wsdl.
- the memmory consumption may depend not only on wsdl size.

We are not able to improve the memmory consumtion since we use internal JAX-WS
classes (the same as wsimport utility) to generate model for wsdl file.
Comment 9 Martin Grebac 2006-09-06 17:57:25 UTC
 Well, we should certainly try to measure and find the problem. If we are not
able to fix it, I still don't understand why would a threshold (has to be
measured, but, let's say 500kb-1MB) triggering a warning about potential problem
and explaining the fix (-Xmx) be a bad and fragile idea. I think we would really
catch the ebay wsdl problem.
Comment 10 _ rkubacki 2006-09-07 10:13:44 UTC
No Milan. You did not fix anything. We only provided a hint about existing

Who is responsible for JAX-WS? Did we report this problem? Are we sure this 3rd
party ocmponent is the only reason? Can't we help to reduce its memory demands?
Comment 11 Milan Kuchtiak 2006-09-07 16:56:46 UTC
JAX-WS team made some memory consumption improvements in jax-ws2.0.1
We still use jax-ws2.0. The jax-ws2.0.1 hasn't been tested with Netbeans yet.
We need to be synchronized with JAX-WS used in GlassFish and as far as I know
they use JAX-WS2.0


However, jax-ws generates bunch of classes. The larger schemas are used, the
more java files are generated. Those could be hundreds, may be thousands.
So that could be also problem with MDR.

Radim, could you help us with heap measurement.
Comment 12 Lukas Jungmann 2007-10-17 00:12:41 UTC
Comment 13 Sergey Grinev 2010-07-15 07:30:13 UTC
Reproducible in NB6.9 and there is no information about workaround not in Release Notes ( nor in /etc/netbeans.conf

java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.<init>(
        at com.sun.codemodel.JDocComment.<init>(
        at com.sun.codemodel.JMethod.javadoc(
        at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(

P.S.: Workaround helps although: I had to setup -Xmx512m in order to get wsimport working.
Comment 14 Denis Anisimov 2011-10-07 06:31:03 UTC
It's a wsimport memory consumption problem.
It's related to the issue #168571.
Comment 15 Milan Kuchtiak 2013-07-11 08:02:16 UTC
Added a new "JVM Options" text field for wsimport, in Web Service (WS Reference) -> Edit WS Attributes -> Wsimport Options section.

This option allows to increase the heap size for wsimport task JVM (needs also to specify fork=true in the same dialog).

Thus the (ant)build script, running in the same JVM as Netbeans, will not consume Netbeans memory when wsimport task is executed.

In case Netbeans itself ends with OutOfMemoryError, increasing the heap size for Netebans JVM is needed (in NB_HOME/etc/netbeans.conf)

Comment 16 Milan Kuchtiak 2013-07-11 08:07:05 UTC
Created attachment 136979 [details]
JVM Options in Edit WS Attributes dialog
Comment 17 Quality Engineering 2013-07-12 02:35:39 UTC
Integrated into 'main-silver', will be available in build *201307112300* on (upload may still be in progress)

User: Milan Kuchtiak <>
Log: #75967 add wsimport JVM Options text field to WS Customizer
Comment 18 Quality Engineering 2013-07-25 02:31:07 UTC
Integrated into 'main-silver', will be available in build *201307242300* on (upload may still be in progress)

User: Milan Kuchtiak <>
Log: #75967 improve the layout of JVM Options text field description