On Thu, Jan 24, 2013 at 12:43 PM, Daniel Kulp <[email protected]> wrote:
>
> On Jan 24, 2013, at 12:37 PM, rouble <[email protected]> wrote:
>
>> Ok, I came across: https://issues.apache.org/jira/browse/CXF-2081
>>
>> This has been fixed in CXF 2.4.X, but it requires a user to modify
>> wsdl2java to compile a large WSDL. That is far from ideal. I am going
>> to open a new JIRA to request for a command line option to specify the
>> maximum memory heap size.
>>
>> It may also be acceptable to increase the default value to 256M, since
>> it does seem like people are hitting this issue with some frequency,
>> and it is not unheard of for apps to use that much heap space while
>> they are working. I will leave that up to the CXF dev team to decide.
>
> Most likely we'd like to have the scripts do something like:
>
> if [ "x$JAVA_MAX_MEM" = "x" ]; then
>     JAVA_MAX_MEM=256M
>     export JAVA_MAX_MEM
> fi
> DEFAULT_JAVA_OPTS="-Xmx$JAVA_MAX_MEM"
> …..
>
> java $DEFAULT_JAVA_OPTS …..
>
> or similar to allow the values to be set via env variables or similar.
>
>
> A patch would definitely be welcome.

I agree. Your solution encompasses more use cases, since it will
address all JAVA_OPTS.

I have filed a JIRA to track the issue. I will see if I can work on a patch.

tia,
rouble

>
> Dan
>
>
>
>
>
>>
>> tia,
>> rouble
>>
>> On Thu, Jan 24, 2013 at 12:21 PM, rouble <[email protected]> wrote:
>>> I am running wsdl2java on a rather large WSDL file and I am getting an
>>> OutOfMemory error. I know for standard JAVA you can increase the size
>>> of the heap using command line options. I tried those - but they don't
>>> seem to take. Any ideas on how to address this with CXF's wsdl2java?
>>>
>>> Here is the relevant portion of the stack trace:
>>> Exception in thread "main" java.lang.OutOfMemoryError: GC overhead
>>> limit exceeded
>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>        at 
>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>        at 
>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>        at 
>>> org.apache.cxf.tools.common.model.JavaMethod.getSignature(JavaMethod.java:94)
>>>        at 
>>> org.apache.cxf.tools.common.model.JavaInterface.hasMethod(JavaInterface.java:156)
>>>        at 
>>> org.apache.cxf.tools.common.model.JavaInterface.addMethod(JavaInterface.java:190)
>>>
>>> tia,
>>> rouble
>
> --
> Daniel Kulp
> [email protected] - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>

Reply via email to