java.lang.OutOfMemoryError while processing my wsdl file with LEIF

Article ID: 1157
Last updated: 07 Feb, 2008
Article ID: 1157
Last updated: 07 Feb, 2008
Revision: 1
Views: 3479
Posted: 01 Jan, 2000
by Dean J.
Updated: 07 Feb, 2008
by Dean J.
Problem


After invoking the wsdl2cpp code generator I see

 

C:RogueWaveXMLOL>wsdl2cpp my.wsdl

*******************************************************************************
 SOAPworX (TM) - WSDL Compiler for C++
 Copyright (C) Rogue Wave Software Corporation 2002. All rights reserved.
*******************************************************************************
*********************************************************************************
* XML Object Link (TM) - XML Schema Compiler for C++.                           *
* Copyright (C) Rogue Wave Software Corporation 2001-2002. All rights reserved. *
*********************************************************************************
...#some files possibly generated here#...


java.lang.OutOfMemoryError
        <<no stack trace available>>




Cause


This error is seen when the Java Virtual Machine cannot allocate an object because it is out of memory  (and additional memory could not be made available by the garbage collector).

The available heap memory allocated for use by the java VM is not sufficient to handle the wsdl file being processed -- fortunately the size of this memory allocation is adjustable via the command line.




Action


You can increase the amount of memory available to the JVM using command line switches.  For LEIF 1.0, you need to modify the wsdl2cpp and xsd2cpp scripts as follows:

Modify the last line of the script from:

wsdl2cpp:

java -cp $RW_HOME/bin/xmlol.jar:$RW_HOME/jars/soapworx.jar com.roguewave.persian.CodeGenerator -home $RW_HOME -bobcat $RW_HOME -xol $RW_HOME -config $RW_HOME/bin/xslt/soaparray.cfg $*

or for xsd2cpp:

java com.roguewave.ratchet.CodeGenerator -home $XMLOL_BIN $*

To:

java -Xms256M -Xmx512M -cp $RW_HOME/bin/xmlol.jar:$RW_HOME/jars/soapworx.jar com.roguewave.persian.CodeGenerator -home $RW_HOME -bobcat $RW_HOME -xol $RW_HOME -config $RW_HOME/bin/xslt/soaparray.cfg $*

and

java -Xms256M -Xmx512M com.roguewave.ratchet.CodeGenerator -home $XMLOL_BIN $*

Where the values of 256 and 512 respectively used above represent possible values but not suggested values. These switches modify the minimum and maximum memory available for use by the VM for its heap, and should be tailored to the available memory on the system you are working on.

At the time of this writing you can get more information on these settings and JVM settings in general on Sun's web site at:

http://java.sun.com/docs/hotspot/gc/

and further information at:

http://java.sun.com/docs/hotspot/PerformanceFAQ.html#171

 

For later versions of LEIF, we provide an RW_JAVAOPT environment variable for adjusting the available heap memory. Use of this variable is explained in the User's Guide.

 

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1157
Last updated: 07 Feb, 2008
Revision: 1
Views: 3479
Posted: 01 Jan, 2000 by Dean J.
Updated: 07 Feb, 2008 by Dean J.

Others in this category