axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter A. Kirk" ...@alpha-solutions.dk>
Subject [Axis2] out of memory
Date Thu, 25 Oct 2007 08:32:29 GMT
Hi

I am trying to track down a "java.lang.OutOfMemoryError: Java heap
space" exception in my application.

I am not sure exactly where the problem lies, but possibly something to
do with CodeGenerationEngine.

My program generates web-services on the fly, and I use Axis2 to help me
along. The out of memory problem occurs if I am generating lots of
web-services in a loop.

For example, if I write a large loop like the following, I get an error.
(Note this is a boiled down version of my actual code which does a lot
more stuff - and usually I get the exception after 20 iterations or so).

Am I doing something wrong here, or is there a limitation with the
CodeGenerationEngine?


String[] parms = new String[] {"-o", "c:/temp", "-sd", "-ss", "-S", ".",
"-R", ".", "--noMessageReceiver", "--noBuildXML", "--noWSDL", "-uri",
"c:/temp/exmployee.wsdl" };

CommandLineOptionParser parser = new CommandLineOptionParser(parms);

try
{
    for (int i=0;i<400;i++)
    {
        CodeGenerationEngine engine = new CodeGenerationEngine(parser);
        engine.generate();
    }
}
catch (Exception e)
{
    System.out.println("Error " + e.getMessage());
}

Thanks,
Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message