| | | | Browse by category |
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.