You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Fabrice Airault <fa...@centile.com> on 2008/04/10 08:22:39 UTC

[AXIS2 1.1.1] OutOfMemoryError: Java heap space when engaging addressing on Stub

hello,

I have a bug with my client (stub) when i use 
stub._getServiceClient().engageModule(new QName("addressing"));
After 2650 request i have "Exception in thread "main" 
java.lang.OutOfMemoryError: Java heap space"

If i don't use engageModule(new QName("addressing")); there is no problem.

You can find my code (stub is created with wsld2java) and
  Exception.

Can you help me to solve my problem.


thanks,

- Fabrice



package com.centile.test;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;

import javax.xml.namespace.QName;

import com.centile.ws.ent.EnterpriseStub;

public class Main{


     public static void main(String[] args) throws Exception {

         EnterpriseStub stub =
             new 
EnterpriseStub("http://nounours:8078/axis2/services/Enterprise?wsdl");
             stub._getServiceClient().engageModule(new QName("addressing"));
             stub._getServiceClient().getOptions().setManageSession(true);
 
stub._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, 
Boolean.TRUE);
              ConfigurationContext configurationContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, 
null);
              HttpClient httpClient = new HttpClient(new 
MultiThreadedHttpConnectionManager());
 
configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, 
Boolean.TRUE);
 
configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, 
httpClient);

         int i=0;
         while(true){
             System.out.println(i++);
             System.out.println(stub.isConnected().get_return());
         }
     }
}


end trace :
-----------
false
2653
false
2654
false
2655
false
2656
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
fabrice@nounours:~/Project/eclipseworkspace/isaudit/bin$


Re: [AXIS2 1.1.1] OutOfMemoryError: Java heap space when engaging addressing on Stub

Posted by Fabrice Airault <fa...@centile.com>.
Hello,


(server 1.1.1)

- In 1.3 wsdl2java.sh never finish on my wsdl. If i kill program, i can 
compile generate code  with 'ant' and I have exactly the same problem.


- If I do a test with service "Version", i have no problem (on axis2 1.3 
and axis2 1.1.1)

java :
while(true){System.out.println("test version"+ (i++)); 
System.out.println(stub.getVersion().get_return());}

I will try to do more investigation to understand what happen.

thanks,

Fabrice

Samisa Abeysinghe wrote:
> Fabrice Airault wrote:
>>
>> hello,
>>
>> I have a bug with my client (stub) when i use 
>> stub._getServiceClient().engageModule(new QName("addressing"));
>> After 2650 request i have "Exception in thread "main" 
>> java.lang.OutOfMemoryError: Java heap space"
>>
>> If i don't use engageModule(new QName("addressing")); there is no 
>> problem.
>>
>> You can find my code (stub is created with wsld2java) and
>>  Exception.
> 
> I am not sure what the exact problem is. However, is it possible for you 
> to try the same with 1.3 release?
> 
> Samisa...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
> 
> 


[Fix in 1.4] [AXIS2 1.1.1] OutOfMemoryError: Java heap space when engaging addressing on Stub

Posted by Fabrice Airault <fa...@centile.com>.
hello,

 >> I am not sure what the exact problem is. However, is it possible for
 >> you to try the same with 1.3 release?


My problem is fix in "Apache Axis2 SNAPSHOT build  (13-04-2008)"(not in 
1.3).
In waiting 1.4 I will use this build.

thanks,

Fabrice



Re: [AXIS2 1.1.1] OutOfMemoryError: Java heap space when engaging addressing on Stub

Posted by Fabrice Airault <fa...@centile.com>.
hello,


if someone is interesting you can find a memory dump after 2400 call. 
Dump was done with yourkit 7.1 build 3026
http://82.232.86.179/addressing_2008_04_10.snapshot.tgz (6,8 Mo)

fabrice

Samisa Abeysinghe wrote:
> Fabrice Airault wrote:
>>
>> hello,
>>
>> I have a bug with my client (stub) when i use 
>> stub._getServiceClient().engageModule(new QName("addressing"));
>> After 2650 request i have "Exception in thread "main" 
>> java.lang.OutOfMemoryError: Java heap space"
>>
>> If i don't use engageModule(new QName("addressing")); there is no 
>> problem.
>>
>> You can find my code (stub is created with wsld2java) and
>>  Exception.
> 
> I am not sure what the exact problem is. However, is it possible for you 
> to try the same with 1.3 release?
> 
> Samisa...
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
> 
> 


Re: [AXIS2 1.1.1] OutOfMemoryError: Java heap space when engaging addressing on Stub

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Fabrice Airault wrote:
>
> hello,
>
> I have a bug with my client (stub) when i use 
> stub._getServiceClient().engageModule(new QName("addressing"));
> After 2650 request i have "Exception in thread "main" 
> java.lang.OutOfMemoryError: Java heap space"
>
> If i don't use engageModule(new QName("addressing")); there is no 
> problem.
>
> You can find my code (stub is created with wsld2java) and
>  Exception.

I am not sure what the exact problem is. However, is it possible for you 
to try the same with 1.3 release?

Samisa...


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