You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Peter A. Kirk" <pk...@alpha-solutions.dk> on 2007/10/25 10:32:29 UTC
[Axis2] out of memory
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
Re: [Axis2] out of memory
Posted by Amila Suriarachchi <am...@gmail.com>.
isn't there any problem when you generate the code for each wsdl seperately?
can you investigate this and see what objects creates more and what objects
create this problem?
Amila.
On 10/25/07, Peter A. Kirk <pk...@alpha-solutions.dk> wrote:
>
> 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
>
>
--
Amila Suriarachchi,
WSO2 Inc.