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 Shehan Simen <ss...@itree.com.au> on 2008/08/11 05:44:42 UTC

Out Of Memory issue in axis2 1.4

Hi,
I am getting this out of memory exception from server side when I try to send attachment using mtom.
I did everything as mentioned in the http://wso2.org/library/264
But it is helpless.
I am using tomcat 5.5.23 and jdk 1.5 (I am restricted to this, cannot change them)

My axis2 xml has settings as:
<parameter name="enableMTOM" locked="false">true</parameter>
    <parameter name="enableSwA">false</parameter>

    <!--Uncomment if you want to enable file caching for attachments -->
    <parameter name="cacheAttachments">true</parameter>
    <parameter name="attachmentDIR">C:/Program Files/Itree/IACD/log</parameter>
    <parameter name="sizeThreshold">4000</parameter>

I cannot send 5mb file. I set the client time out to 10 mins, but it does not help.
Can anyone please help me? Whats wrong with axis2?

Thank you.

Regards


RE: Out Of Memory issue in axis2 1.4

Posted by Martin Gainty <mg...@hotmail.com>.
perhaps you are constrained by the JVM heap
what are the max heap params in JAVA_OPTS for your invoking JVM?
here is a min suggestion that I configured via JAVA_OPTS
-Xmx512m 
(and if you still get OOM bump to -Xmx1024m )

?
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


Date: Tue, 12 Aug 2008 08:26:19 -0700
From: csethil@gmail.com
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4



But if I loaded the OmElement from the method, OmElement  = request.getOMElement,
does not it mean that the whole request (with the attachment) loaded to memory?Nope... Loading of the attachment happens only when you do a OmElement.toString()... 



If it is the case, then there is no point of doing streaming to
the already loaded OmElement.

Please let me know.

 

Thank you.

 

Regards,

Simen

 



From: Thilina Gunarathne
[mailto:csethil@gmail.com] 

Sent: Tuesday, 12 August 2008 4:35 PM

To: axis-user@ws.apache.org

Subject: Re: Out Of Memory issue in axis2 1.4



 



Nope... It's not due to Axis2..




It might be vulnerable due to your implementation.. For an example, you said
you are writing the whole OMElement to a DataBase. In such a case if you just
did OMElement.toString(), it'll cause the attachment to get loaded in to
memory. This will eventually cause a OOM. In such a scenerio you can try
streamingly writing it to the database (I don't know much about databases) by
serialising the OMElement to a stream. Or you can seperately store the cached
binary file in the database..



thanks,

Thilina



On Mon, Aug 11, 2008 at 8:27 PM, Shehan Simen <ss...@itree.com.au> wrote:





Hi Thilina,

I will report the issue in
JIRA.

Why did you say that my server
side is vulnerable for large attachments? Are there known bugs in mtom?

Please advise me.

 

Thank you.

 

Regards,

simen 

 



From: Thilina Gunarathne [mailto:csethil@gmail.com] 

Sent: Tuesday, 12 August 2008 12:49 PM







To: axis-user@ws.apache.org

Subject: Re: Out Of Memory issue in axis2 1.4











 



Glad to know it's working.. You can go to https://issues.apache.org/jira/browse/AXIS2
and create a new issues... You might need to create account...



Also keep in mind that u'r service side logic may be vulnerable to fail when
presented with a large attachment.



thanks,

Thilina



On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen <ss...@itree.com.au>
wrote:





Hi Thilina,

Yes it is working if I use
xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry,
I am not sure how to log it in JIRA.

If it is easy, could you please
log it or let me know how to do it.

 

Thank you for your help so far.
Otherwise I will be stuck here forever.

 

Regards,

simen

 



From: Thilina Gunarathne [mailto:csethil@gmail.com] 

Sent: Monday, 11 August 2008 5:56 PM







To: axis-user@ws.apache.org

Subject: Re: Out Of Memory issue in axis2 1.4











 



Hi,

I'm not sure whether ADB will work for simple type restriction on ADB. Can you
change it to simply a xsd:base64Binary element and see whether it'll work. You
can have a look at the wsdl given in  Axis2 MTOM guide to get an idea.



If that works, please log a JIRA for the simple type restriction issue.



thanks,

Thilina



On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>
wrote:





Hi Thilina,

I am using ADB. The client and
server are generated using wsdl2java eclipse plugin. Both using ADB.

This is the part related to my
wsdl.

 

- <<xs:simpleType
name="FileRawDataType">

- <    <xs:restriction
base="xs:base64Binary">

  <    
   <xs:maxLength value="5242880" /> 


    </xs:restriction>


 </xs:simpleType>


 

 
Can you figure out the issue?

 

  
Thanks.

  
Regards,

   
ssimen

 

 



From: Thilina Gunarathne [mailto:csethil@gmail.com] 

Sent: Monday, 11 August 2008 3:35 PM







To: axis-user@ws.apache.org

Subject: Re: Out Of Memory issue in axis2 1.4











 



Hi,

Can u explain a bit about ur client side... Which data binding framework r u
using?.. Does ur WSDL have any xsd:base64Binary elements.



thanks,

~Thilina



On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>
wrote:





Hi Thilina,

I looked the tcpmon and confirm
that it is inside the body. But still I Can't understand why it is sending the
attachment inside the soap body.

I followed the http://wso2.org/library/264
to send attachments using MTOM

 

Reading to the OMElement can be overcome by increasing the heap memory size
of the tomcat server. But the fundamental question still remains, that is why
the attachment is going inside the soap body? I tried almost everything to send
it as an mtom attachment.

Much appreciate your help.

 

Thank you.

 

Regards,

ssimen

 

 



From: Thilina Gunarathne [mailto:csethil@gmail.com] 

Sent: Monday, 11 August 2008 3:14 PM







To: axis-user@ws.apache.org

Subject: Re: Out Of Memory issue in axis2 1.4











 



Hi,










Yes, it is sending inside the
soap body rather than an attachment. Why it is going inside the soap body? I
changed all the required changes to send it as separate attachment.

(stub._getServiceClient().getOptions().setProperty(

                             
Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)


 

Next question is, eventhough it
is sending inside the soap bosy, what the problem of it? Is there any size
limitation to the soap message?









It's the JVM heap size... The message get's loaded in to the memory with
added base64 overhead.  Did you check the message using TCPMON or are you
referring to the message you see in the database..










I am reading the whole request to
the OMElement to save it in the database.

Is that the problem?

How can I fix it? Please help me.









You can fix it by sending the binary data as an attachment.. But even the
cached attachment will get loaded to the memory if you are reading the whole
request to an OMElement and writing it to the database. You will need to
specially handle the cached binary data file..



thanks,

Thilina










 

Thank you.

Regards,

Simen

 



From: Thilina Gunarathne [mailto:csethil@gmail.com] 

Sent: Monday, 11 August 2008 2:01 PM

To: axis-user@ws.apache.org

Subject: Re: Out Of Memory issue in axis2 1.4







 












Can anyone please help me? Whats wrong with axis2? 









It can be two things... 

1. Attachment may be going inline with base64 encoding, rather than as an
attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)

2. Your service implementation might be loading the whole cached binary data to
the memory..



thanks,

Thilina










  














Thank you.

 

Regards

 














-- 

Thilina Gunarathne - http://thilinag.blogspot.com




















-- 

Thilina Gunarathne - http://thilinag.blogspot.com


















-- 

Thilina Gunarathne - http://thilinag.blogspot.com


















-- 

Thilina Gunarathne - http://thilinag.blogspot.com


















-- 

Thilina Gunarathne - http://thilinag.blogspot.com


















-- 

Thilina Gunarathne - http://thilinag.blogspot.com










-- 
Thilina Gunarathne - http://thilinag.blogspot.com



_________________________________________________________________
Got Game? Win Prizes in the Windows Live Hotmail Mobile Summer Games Trivia Contest
http://www.gowindowslive.com/summergames?ocid=TXT_TAGHM

RE: Out Of Memory issue in axis2 1.4

Posted by Shehan Simen <ss...@itree.com.au>.
Hi Thilina,
Could you please tell me how to stream the OmElement?
If I can create a blob type from the OMelement, that would be great.
I don't understand a way to save the OmElement without calling the toString() (or toStringWithConcume()) method.
Please give me code snippet.

Thank you.

Regards,
simen

From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: Wednesday, 13 August 2008 1:26 AM
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4



But if I loaded the OmElement from the method, OmElement  = request.getOMElement, does not it mean that the whole request (with the attachment) loaded to memory?
Nope... Loading of the attachment happens only when you do a OmElement.toString()...

If it is the case, then there is no point of doing streaming to the already loaded OmElement.

Please let me know.



Thank you.



Regards,

Simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Tuesday, 12 August 2008 4:35 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Nope... It's not due to Axis2..

It might be vulnerable due to your implementation.. For an example, you said you are writing the whole OMElement to a DataBase. In such a case if you just did OMElement.toString(), it'll cause the attachment to get loaded in to memory. This will eventually cause a OOM. In such a scenerio you can try streamingly writing it to the database (I don't know much about databases) by serialising the OMElement to a stream. Or you can seperately store the cached binary file in the database..

thanks,
Thilina

On Mon, Aug 11, 2008 at 8:27 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I will report the issue in JIRA.

Why did you say that my server side is vulnerable for large attachments? Are there known bugs in mtom?

Please advise me.



Thank you.



Regards,

simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Tuesday, 12 August 2008 12:49 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Glad to know it's working.. You can go to https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You might need to create account...

Also keep in mind that u'r service side logic may be vulnerable to fail when presented with a large attachment.

thanks,
Thilina

On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

Yes it is working if I use xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry, I am not sure how to log it in JIRA.

If it is easy, could you please log it or let me know how to do it.



Thank you for your help so far. Otherwise I will be stuck here forever.



Regards,

simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 5:56 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,
I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an idea.

If that works, please log a JIRA for the simple type restriction issue.

thanks,
Thilina

On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB.

This is the part related to my wsdl.



-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <<xs:simpleType name="FileRawDataType">

-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <    <xs:restriction base="xs:base64Binary">

  <        <xs:maxLength value="5242880" />

    </xs:restriction>

 </xs:simpleType>



  Can you figure out the issue?



   Thanks.

   Regards,

    ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:35 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,
Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements.

thanks,
~Thilina

On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body.

I followed the http://wso2.org/library/264 to send attachments using MTOM



Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment.

Much appreciate your help.



Thank you.



Regards,

ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:14 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,

Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment.

(stub._getServiceClient().getOptions().setProperty(

                              Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)



Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message?

It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead.  Did you check the message using TCPMON or are you referring to the message you see in the database..

I am reading the whole request to the OMElement to save it in the database.

Is that the problem?

How can I fix it? Please help me.

You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file..

thanks,
Thilina



Thank you.

Regards,

Simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 2:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Can anyone please help me? Whats wrong with axis2?

It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data to the memory..

thanks,
Thilina



Thank you.



Regards





--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com

Re: Out Of Memory issue in axis2 1.4

Posted by Thilina Gunarathne <cs...@gmail.com>.
> But if I loaded the OmElement from the method, OmElement  =
> request.getOMElement, does not it mean that the whole request (with the
> attachment) loaded to memory?
>
Nope... Loading of the attachment happens only when you do a
OmElement.toString()...

> If it is the case, then there is no point of doing streaming to the already
> loaded OmElement.
>
> Please let me know.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Tuesday, 12 August 2008 4:35 PM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Nope... It's not due to Axis2..
>
> It might be vulnerable due to your implementation.. For an example, you
> said you are writing the whole OMElement to a DataBase. In such a case if
> you just did OMElement.toString(), it'll cause the attachment to get loaded
> in to memory. This will eventually cause a OOM. In such a scenerio you can
> try streamingly writing it to the database (I don't know much about
> databases) by serialising the OMElement to a stream. Or you can seperately
> store the cached binary file in the database..
>
> thanks,
> Thilina
>
> On Mon, Aug 11, 2008 at 8:27 PM, Shehan Simen <ss...@itree.com.au> wrote:
>
> Hi Thilina,
>
> I will report the issue in JIRA.
>
> Why did you say that my server side is vulnerable for large attachments?
> Are there known bugs in mtom?
>
> Please advise me.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Tuesday, 12 August 2008 12:49 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Glad to know it's working.. You can go to
> https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You
> might need to create account...
>
> Also keep in mind that u'r service side logic may be vulnerable to fail
> when presented with a large attachment.
>
> thanks,
> Thilina
>
> On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen <ss...@itree.com.au> wrote:
>
> Hi Thilina,
>
> Yes it is working if I use xsd:base64Binary rather than a simple type. So
> this is an issue to fix. Sorry, I am not sure how to log it in JIRA.
>
> If it is easy, could you please log it or let me know how to do it.
>
>
>
> Thank you for your help so far. Otherwise I will be stuck here forever.
>
>
>
> Regards,
>
> simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 5:56 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
> I'm not sure whether ADB will work for simple type restriction on ADB. Can
> you change it to simply a xsd:base64Binary element and see whether it'll
> work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an
> idea.
>
> If that works, please log a JIRA for the simple type restriction issue.
>
> thanks,
> Thilina
>
> On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>
> wrote:
>
> Hi Thilina,
>
> I am using ADB. The client and server are generated using wsdl2java eclipse
> plugin. Both using ADB.
>
> This is the part related to my wsdl.
>
>
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl>
> <<xs:simpleType name="*FileRawDataType*">
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <
>   <xs:restriction base="*xs:base64Binary*">
>
> * * <        <xs:maxLength value="*5242880*" />
>
> * *   </xs:restriction>
>
> * *</xs:simpleType>
>
>
>
>   Can you figure out the issue?
>
>
>
>    Thanks.
>
>    Regards,
>
>     ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:35 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
> Can u explain a bit about ur client side... Which data binding framework r
> u using?.. Does ur WSDL have any xsd:base64Binary elements.
>
> thanks,
> ~Thilina
>
> On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>
> wrote:
>
> Hi Thilina,
>
> I looked the tcpmon and confirm that it is inside the body. But still I
> Can't understand why it is sending the attachment inside the soap body.
>
> I followed the http://wso2.org/library/264 to send attachments using MTOM
>
>
>
> Reading to the OMElement can be overcome by increasing the heap memory size
> of the tomcat server. But the fundamental question still remains, that is
> why the attachment is going inside the soap body? I tried almost everything
> to send it as an mtom attachment.
>
> Much appreciate your help.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:14 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
>
>  Yes, it is sending inside the soap body rather than an attachment. Why it
> is going inside the soap body? I changed all the required changes to send it
> as separate attachment.
>
> (stub._getServiceClient().getOptions().setProperty(
>
>                               Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);)
>
>
>
> Next question is, eventhough it is sending inside the soap bosy, what the
> problem of it? Is there any size limitation to the soap message?
>
>  It's the JVM heap size... The message get's loaded in to the memory with
> added base64 overhead.  Did you check the message using TCPMON or are you
> referring to the message you see in the database..
>
>  I am reading the whole request to the OMElement to save it in the
> database.
>
> Is that the problem?
>
> How can I fix it? Please help me.
>
>  You can fix it by sending the binary data as an attachment.. But even the
> cached attachment will get loaded to the memory if you are reading the whole
> request to an OMElement and writing it to the database. You will need to
> specially handle the cached binary data file..
>
> thanks,
> Thilina
>
>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 2:01 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
>  Can anyone please help me? Whats wrong with axis2?
>
>  It can be two things...
> 1. Attachment may be going inline with base64 encoding, rather than as an
> attachment. Check the message using tcpmon.(
> http://ws.apache.org/commons/tcpmon)
> 2. Your service implementation might be loading the whole cached binary
> data to the memory..
>
> thanks,
> Thilina
>
>
>
>   Thank you.
>
>
>
> Regards
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

RE: Out Of Memory issue in axis2 1.4

Posted by Shehan Simen <ss...@itree.com.au>.
Hi Thilina,
Thank you for the explanation.
But if I loaded the OmElement from the method, OmElement  = request.getOMElement, does not it mean that the whole request (with the attachment) loaded to memory?
If it is the case, then there is no point of doing streaming to the already loaded OmElement.
Please let me know.

Thank you.

Regards,
Simen

From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: Tuesday, 12 August 2008 4:35 PM
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4

Nope... It's not due to Axis2..

It might be vulnerable due to your implementation.. For an example, you said you are writing the whole OMElement to a DataBase. In such a case if you just did OMElement.toString(), it'll cause the attachment to get loaded in to memory. This will eventually cause a OOM. In such a scenerio you can try streamingly writing it to the database (I don't know much about databases) by serialising the OMElement to a stream. Or you can seperately store the cached binary file in the database..

thanks,
Thilina
On Mon, Aug 11, 2008 at 8:27 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I will report the issue in JIRA.

Why did you say that my server side is vulnerable for large attachments? Are there known bugs in mtom?

Please advise me.



Thank you.



Regards,

simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Tuesday, 12 August 2008 12:49 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Glad to know it's working.. You can go to https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You might need to create account...

Also keep in mind that u'r service side logic may be vulnerable to fail when presented with a large attachment.

thanks,
Thilina

On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

Yes it is working if I use xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry, I am not sure how to log it in JIRA.

If it is easy, could you please log it or let me know how to do it.



Thank you for your help so far. Otherwise I will be stuck here forever.



Regards,

simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 5:56 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,
I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an idea.

If that works, please log a JIRA for the simple type restriction issue.

thanks,
Thilina

On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB.

This is the part related to my wsdl.



-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <<xs:simpleType name="FileRawDataType">

-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <    <xs:restriction base="xs:base64Binary">

  <        <xs:maxLength value="5242880" />

    </xs:restriction>

 </xs:simpleType>



  Can you figure out the issue?



   Thanks.

   Regards,

    ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:35 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,
Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements.

thanks,
~Thilina

On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body.

I followed the http://wso2.org/library/264 to send attachments using MTOM



Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment.

Much appreciate your help.



Thank you.



Regards,

ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:14 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,

Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment.

(stub._getServiceClient().getOptions().setProperty(

                              Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)



Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message?

It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead.  Did you check the message using TCPMON or are you referring to the message you see in the database..

I am reading the whole request to the OMElement to save it in the database.

Is that the problem?

How can I fix it? Please help me.

You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file..

thanks,
Thilina



Thank you.

Regards,

Simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 2:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Can anyone please help me? Whats wrong with axis2?

It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data to the memory..

thanks,
Thilina



Thank you.



Regards





--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com

Re: Out Of Memory issue in axis2 1.4

Posted by Thilina Gunarathne <cs...@gmail.com>.
Nope... It's not due to Axis2..

It might be vulnerable due to your implementation.. For an example, you said
you are writing the whole OMElement to a DataBase. In such a case if you
just did OMElement.toString(), it'll cause the attachment to get loaded in
to memory. This will eventually cause a OOM. In such a scenerio you can try
streamingly writing it to the database (I don't know much about databases)
by serialising the OMElement to a stream. Or you can seperately store the
cached binary file in the database..

thanks,
Thilina

On Mon, Aug 11, 2008 at 8:27 PM, Shehan Simen <ss...@itree.com.au> wrote:

>  Hi Thilina,
>
> I will report the issue in JIRA.
>
> Why did you say that my server side is vulnerable for large attachments?
> Are there known bugs in mtom?
>
> Please advise me.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Tuesday, 12 August 2008 12:49 PM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Glad to know it's working.. You can go to
> https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You
> might need to create account...
>
> Also keep in mind that u'r service side logic may be vulnerable to fail
> when presented with a large attachment.
>
> thanks,
> Thilina
>
> On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen <ss...@itree.com.au> wrote:
>
> Hi Thilina,
>
> Yes it is working if I use xsd:base64Binary rather than a simple type. So
> this is an issue to fix. Sorry, I am not sure how to log it in JIRA.
>
> If it is easy, could you please log it or let me know how to do it.
>
>
>
> Thank you for your help so far. Otherwise I will be stuck here forever.
>
>
>
> Regards,
>
> simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 5:56 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
> I'm not sure whether ADB will work for simple type restriction on ADB. Can
> you change it to simply a xsd:base64Binary element and see whether it'll
> work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an
> idea.
>
> If that works, please log a JIRA for the simple type restriction issue.
>
> thanks,
> Thilina
>
> On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>
> wrote:
>
> Hi Thilina,
>
> I am using ADB. The client and server are generated using wsdl2java eclipse
> plugin. Both using ADB.
>
> This is the part related to my wsdl.
>
>
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl>
> <<xs:simpleType name="*FileRawDataType*">
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <
>   <xs:restriction base="*xs:base64Binary*">
>
> * * <        <xs:maxLength value="*5242880*" />
>
> * *   </xs:restriction>
>
> * *</xs:simpleType>
>
>
>
>   Can you figure out the issue?
>
>
>
>    Thanks.
>
>    Regards,
>
>     ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:35 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
> Can u explain a bit about ur client side... Which data binding framework r
> u using?.. Does ur WSDL have any xsd:base64Binary elements.
>
> thanks,
> ~Thilina
>
> On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>
> wrote:
>
> Hi Thilina,
>
> I looked the tcpmon and confirm that it is inside the body. But still I
> Can't understand why it is sending the attachment inside the soap body.
>
> I followed the http://wso2.org/library/264 to send attachments using MTOM
>
>
>
> Reading to the OMElement can be overcome by increasing the heap memory size
> of the tomcat server. But the fundamental question still remains, that is
> why the attachment is going inside the soap body? I tried almost everything
> to send it as an mtom attachment.
>
> Much appreciate your help.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:14 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
>
>  Yes, it is sending inside the soap body rather than an attachment. Why it
> is going inside the soap body? I changed all the required changes to send it
> as separate attachment.
>
> (stub._getServiceClient().getOptions().setProperty(
>
>                               Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);)
>
>
>
> Next question is, eventhough it is sending inside the soap bosy, what the
> problem of it? Is there any size limitation to the soap message?
>
>  It's the JVM heap size... The message get's loaded in to the memory with
> added base64 overhead.  Did you check the message using TCPMON or are you
> referring to the message you see in the database..
>
>  I am reading the whole request to the OMElement to save it in the
> database.
>
> Is that the problem?
>
> How can I fix it? Please help me.
>
>  You can fix it by sending the binary data as an attachment.. But even the
> cached attachment will get loaded to the memory if you are reading the whole
> request to an OMElement and writing it to the database. You will need to
> specially handle the cached binary data file..
>
> thanks,
> Thilina
>
>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 2:01 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
>  Can anyone please help me? Whats wrong with axis2?
>
>  It can be two things...
> 1. Attachment may be going inline with base64 encoding, rather than as an
> attachment. Check the message using tcpmon.(
> http://ws.apache.org/commons/tcpmon)
> 2. Your service implementation might be loading the whole cached binary
> data to the memory..
>
> thanks,
> Thilina
>
>
>
>   Thank you.
>
>
>
> Regards
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

RE: Out Of Memory issue in axis2 1.4

Posted by Shehan Simen <ss...@itree.com.au>.
Hi Thilina,
I will report the issue in JIRA.
Why did you say that my server side is vulnerable for large attachments? Are there known bugs in mtom?
Please advise me.

Thank you.

Regards,
simen

From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: Tuesday, 12 August 2008 12:49 PM
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4

Glad to know it's working.. You can go to https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You might need to create account...

Also keep in mind that u'r service side logic may be vulnerable to fail when presented with a large attachment.

thanks,
Thilina
On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

Yes it is working if I use xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry, I am not sure how to log it in JIRA.

If it is easy, could you please log it or let me know how to do it.



Thank you for your help so far. Otherwise I will be stuck here forever.



Regards,

simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 5:56 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,
I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an idea.

If that works, please log a JIRA for the simple type restriction issue.

thanks,
Thilina

On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB.

This is the part related to my wsdl.



-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <<xs:simpleType name="FileRawDataType">

-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <    <xs:restriction base="xs:base64Binary">

  <        <xs:maxLength value="5242880" />

    </xs:restriction>

 </xs:simpleType>



  Can you figure out the issue?



   Thanks.

   Regards,

    ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:35 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,
Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements.

thanks,
~Thilina

On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body.

I followed the http://wso2.org/library/264 to send attachments using MTOM



Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment.

Much appreciate your help.



Thank you.



Regards,

ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:14 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,

Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment.

(stub._getServiceClient().getOptions().setProperty(

                              Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)



Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message?

It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead.  Did you check the message using TCPMON or are you referring to the message you see in the database..

I am reading the whole request to the OMElement to save it in the database.

Is that the problem?

How can I fix it? Please help me.

You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file..

thanks,
Thilina



Thank you.

Regards,

Simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 2:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Can anyone please help me? Whats wrong with axis2?

It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data to the memory..

thanks,
Thilina



Thank you.



Regards





--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com

Re: Out Of Memory issue in axis2 1.4

Posted by Thilina Gunarathne <cs...@gmail.com>.
Glad to know it's working.. You can go to
https://issues.apache.org/jira/browse/AXIS2 and create a new issues... You
might need to create account...

Also keep in mind that u'r service side logic may be vulnerable to fail when
presented with a large attachment.

thanks,
Thilina

On Mon, Aug 11, 2008 at 4:58 PM, Shehan Simen <ss...@itree.com.au> wrote:

>  Hi Thilina,
>
> Yes it is working if I use xsd:base64Binary rather than a simple type. So
> this is an issue to fix. Sorry, I am not sure how to log it in JIRA.
>
> If it is easy, could you please log it or let me know how to do it.
>
>
>
> Thank you for your help so far. Otherwise I will be stuck here forever.
>
>
>
> Regards,
>
> simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 5:56 PM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
> I'm not sure whether ADB will work for simple type restriction on ADB. Can
> you change it to simply a xsd:base64Binary element and see whether it'll
> work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an
> idea.
>
> If that works, please log a JIRA for the simple type restriction issue.
>
> thanks,
> Thilina
>
> On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>
> wrote:
>
> Hi Thilina,
>
> I am using ADB. The client and server are generated using wsdl2java eclipse
> plugin. Both using ADB.
>
> This is the part related to my wsdl.
>
>
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl>
> <<xs:simpleType name="*FileRawDataType*">
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <
>   <xs:restriction base="*xs:base64Binary*">
>
> * * <        <xs:maxLength value="*5242880*" />
>
> * *   </xs:restriction>
>
> * *</xs:simpleType>
>
>
>
>   Can you figure out the issue?
>
>
>
>    Thanks.
>
>    Regards,
>
>     ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:35 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
> Can u explain a bit about ur client side... Which data binding framework r
> u using?.. Does ur WSDL have any xsd:base64Binary elements.
>
> thanks,
> ~Thilina
>
> On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>
> wrote:
>
> Hi Thilina,
>
> I looked the tcpmon and confirm that it is inside the body. But still I
> Can't understand why it is sending the attachment inside the soap body.
>
> I followed the http://wso2.org/library/264 to send attachments using MTOM
>
>
>
> Reading to the OMElement can be overcome by increasing the heap memory size
> of the tomcat server. But the fundamental question still remains, that is
> why the attachment is going inside the soap body? I tried almost everything
> to send it as an mtom attachment.
>
> Much appreciate your help.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:14 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
>
>  Yes, it is sending inside the soap body rather than an attachment. Why it
> is going inside the soap body? I changed all the required changes to send it
> as separate attachment.
>
> (stub._getServiceClient().getOptions().setProperty(
>
>                               Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);)
>
>
>
> Next question is, eventhough it is sending inside the soap bosy, what the
> problem of it? Is there any size limitation to the soap message?
>
>  It's the JVM heap size... The message get's loaded in to the memory with
> added base64 overhead.  Did you check the message using TCPMON or are you
> referring to the message you see in the database..
>
>  I am reading the whole request to the OMElement to save it in the
> database.
>
> Is that the problem?
>
> How can I fix it? Please help me.
>
>  You can fix it by sending the binary data as an attachment.. But even the
> cached attachment will get loaded to the memory if you are reading the whole
> request to an OMElement and writing it to the database. You will need to
> specially handle the cached binary data file..
>
> thanks,
> Thilina
>
>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 2:01 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
>  Can anyone please help me? Whats wrong with axis2?
>
>  It can be two things...
> 1. Attachment may be going inline with base64 encoding, rather than as an
> attachment. Check the message using tcpmon.(
> http://ws.apache.org/commons/tcpmon)
> 2. Your service implementation might be loading the whole cached binary
> data to the memory..
>
> thanks,
> Thilina
>
>
>
>   Thank you.
>
>
>
> Regards
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

RE: Out Of Memory issue in axis2 1.4

Posted by Shehan Simen <ss...@itree.com.au>.
Hi Thilina,
Yes it is working if I use xsd:base64Binary rather than a simple type. So this is an issue to fix. Sorry, I am not sure how to log it in JIRA.
If it is easy, could you please log it or let me know how to do it.

Thank you for your help so far. Otherwise I will be stuck here forever.

Regards,
simen

From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: Monday, 11 August 2008 5:56 PM
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4

Hi,
I'm not sure whether ADB will work for simple type restriction on ADB. Can you change it to simply a xsd:base64Binary element and see whether it'll work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an idea.

If that works, please log a JIRA for the simple type restriction issue.

thanks,
Thilina
On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB.

This is the part related to my wsdl.



-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <<xs:simpleType name="FileRawDataType">

-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <    <xs:restriction base="xs:base64Binary">

  <        <xs:maxLength value="5242880" />

    </xs:restriction>

 </xs:simpleType>



  Can you figure out the issue?



   Thanks.

   Regards,

    ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:35 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,
Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements.

thanks,
~Thilina

On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body.

I followed the http://wso2.org/library/264 to send attachments using MTOM



Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment.

Much appreciate your help.



Thank you.



Regards,

ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:14 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,

Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment.

(stub._getServiceClient().getOptions().setProperty(

                              Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)



Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message?

It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead.  Did you check the message using TCPMON or are you referring to the message you see in the database..

I am reading the whole request to the OMElement to save it in the database.

Is that the problem?

How can I fix it? Please help me.

You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file..

thanks,
Thilina



Thank you.

Regards,

Simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 2:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Can anyone please help me? Whats wrong with axis2?

It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data to the memory..

thanks,
Thilina



Thank you.



Regards





--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com

Re: Out Of Memory issue in axis2 1.4

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
I'm not sure whether ADB will work for simple type restriction on ADB. Can
you change it to simply a xsd:base64Binary element and see whether it'll
work. You can have a look at the wsdl given in  Axis2 MTOM guide to get an
idea.

If that works, please log a JIRA for the simple type restriction issue.

thanks,
Thilina

On Sun, Aug 10, 2008 at 10:52 PM, Shehan Simen <ss...@itree.com.au> wrote:

>  Hi Thilina,
>
> I am using ADB. The client and server are generated using wsdl2java eclipse
> plugin. Both using ADB.
>
> This is the part related to my wsdl.
>
>
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl>
> <<xs:simpleType name="*FileRawDataType*">
>
> *-* <http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <
>   <xs:restriction base="*xs:base64Binary*">
>
> * * <        <xs:maxLength value="*5242880*" />
>
> * *   </xs:restriction>
>
> * *</xs:simpleType>
>
>
>
>   Can you figure out the issue?
>
>
>
>    Thanks.
>
>    Regards,
>
>     ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:35 PM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
> Can u explain a bit about ur client side... Which data binding framework r
> u using?.. Does ur WSDL have any xsd:base64Binary elements.
>
> thanks,
> ~Thilina
>
> On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>
> wrote:
>
> Hi Thilina,
>
> I looked the tcpmon and confirm that it is inside the body. But still I
> Can't understand why it is sending the attachment inside the soap body.
>
> I followed the http://wso2.org/library/264 to send attachments using MTOM
>
>
>
> Reading to the OMElement can be overcome by increasing the heap memory size
> of the tomcat server. But the fundamental question still remains, that is
> why the attachment is going inside the soap body? I tried almost everything
> to send it as an mtom attachment.
>
> Much appreciate your help.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:14 PM
>
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
>
>  Yes, it is sending inside the soap body rather than an attachment. Why it
> is going inside the soap body? I changed all the required changes to send it
> as separate attachment.
>
> (stub._getServiceClient().getOptions().setProperty(
>
>                               Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);)
>
>
>
> Next question is, eventhough it is sending inside the soap bosy, what the
> problem of it? Is there any size limitation to the soap message?
>
>  It's the JVM heap size... The message get's loaded in to the memory with
> added base64 overhead.  Did you check the message using TCPMON or are you
> referring to the message you see in the database..
>
>  I am reading the whole request to the OMElement to save it in the
> database.
>
> Is that the problem?
>
> How can I fix it? Please help me.
>
>  You can fix it by sending the binary data as an attachment.. But even the
> cached attachment will get loaded to the memory if you are reading the whole
> request to an OMElement and writing it to the database. You will need to
> specially handle the cached binary data file..
>
> thanks,
> Thilina
>
>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 2:01 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
>  Can anyone please help me? Whats wrong with axis2?
>
>  It can be two things...
> 1. Attachment may be going inline with base64 encoding, rather than as an
> attachment. Check the message using tcpmon.(
> http://ws.apache.org/commons/tcpmon)
> 2. Your service implementation might be loading the whole cached binary
> data to the memory..
>
> thanks,
> Thilina
>
>
>
>   Thank you.
>
>
>
> Regards
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

RE: Out Of Memory issue in axis2 1.4

Posted by Shehan Simen <ss...@itree.com.au>.
Hi Thilina,
I am using ADB. The client and server are generated using wsdl2java eclipse plugin. Both using ADB.
This is the part related to my wsdl.

-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <<xs:simpleType name="FileRawDataType">
-<http://scania.itree.com.au:8080/axis2/services/SchemesService?wsdl> <    <xs:restriction base="xs:base64Binary">
  <        <xs:maxLength value="5242880" />
    </xs:restriction>
 </xs:simpleType>

  Can you figure out the issue?

   Thanks.
   Regards,
    ssimen


From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: Monday, 11 August 2008 3:35 PM
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4

Hi,
Can u explain a bit about ur client side... Which data binding framework r u using?.. Does ur WSDL have any xsd:base64Binary elements.

thanks,
~Thilina
On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au>> wrote:

Hi Thilina,

I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body.

I followed the http://wso2.org/library/264 to send attachments using MTOM



Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment.

Much appreciate your help.



Thank you.



Regards,

ssimen





From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 3:14 PM

To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Hi,

Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment.

(stub._getServiceClient().getOptions().setProperty(

                              Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)



Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message?

It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead.  Did you check the message using TCPMON or are you referring to the message you see in the database..

I am reading the whole request to the OMElement to save it in the database.

Is that the problem?

How can I fix it? Please help me.

You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file..

thanks,
Thilina



Thank you.

Regards,

Simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 2:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Can anyone please help me? Whats wrong with axis2?

It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data to the memory..

thanks,
Thilina



Thank you.



Regards





--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com

Re: Out Of Memory issue in axis2 1.4

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
Can u explain a bit about ur client side... Which data binding framework r u
using?.. Does ur WSDL have any xsd:base64Binary elements.

thanks,
~Thilina

On Sun, Aug 10, 2008 at 10:22 PM, Shehan Simen <ss...@itree.com.au> wrote:

>  Hi Thilina,
>
> I looked the tcpmon and confirm that it is inside the body. But still I
> Can't understand why it is sending the attachment inside the soap body.
>
> I followed the http://wso2.org/library/264 to send attachments using MTOM
>
>
>
> Reading to the OMElement can be overcome by increasing the heap memory size
> of the tomcat server. But the fundamental question still remains, that is
> why the attachment is going inside the soap body? I tried almost everything
> to send it as an mtom attachment.
>
> Much appreciate your help.
>
>
>
> Thank you.
>
>
>
> Regards,
>
> ssimen
>
>
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 3:14 PM
>
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
> Hi,
>
>  Yes, it is sending inside the soap body rather than an attachment. Why it
> is going inside the soap body? I changed all the required changes to send it
> as separate attachment.
>
> (stub._getServiceClient().getOptions().setProperty(
>
>                               Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);)
>
>
>
> Next question is, eventhough it is sending inside the soap bosy, what the
> problem of it? Is there any size limitation to the soap message?
>
>  It's the JVM heap size... The message get's loaded in to the memory with
> added base64 overhead.  Did you check the message using TCPMON or are you
> referring to the message you see in the database..
>
>  I am reading the whole request to the OMElement to save it in the
> database.
>
> Is that the problem?
>
> How can I fix it? Please help me.
>
>  You can fix it by sending the binary data as an attachment.. But even the
> cached attachment will get loaded to the memory if you are reading the whole
> request to an OMElement and writing it to the database. You will need to
> specially handle the cached binary data file..
>
> thanks,
> Thilina
>
>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 2:01 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
>  Can anyone please help me? Whats wrong with axis2?
>
>  It can be two things...
> 1. Attachment may be going inline with base64 encoding, rather than as an
> attachment. Check the message using tcpmon.(
> http://ws.apache.org/commons/tcpmon)
> 2. Your service implementation might be loading the whole cached binary
> data to the memory..
>
> thanks,
> Thilina
>
>
>
>   Thank you.
>
>
>
> Regards
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

RE: Out Of Memory issue in axis2 1.4

Posted by Shehan Simen <ss...@itree.com.au>.
Hi Thilina,
I looked the tcpmon and confirm that it is inside the body. But still I Can't understand why it is sending the attachment inside the soap body.
I followed the http://wso2.org/library/264 to send attachments using MTOM

Reading to the OMElement can be overcome by increasing the heap memory size of the tomcat server. But the fundamental question still remains, that is why the attachment is going inside the soap body? I tried almost everything to send it as an mtom attachment.
Much appreciate your help.

Thank you.

Regards,
ssimen


From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: Monday, 11 August 2008 3:14 PM
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4

Hi,

Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment.

(stub._getServiceClient().getOptions().setProperty(

                              Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)



Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message?
It's the JVM heap size... The message get's loaded in to the memory with added base64 overhead.  Did you check the message using TCPMON or are you referring to the message you see in the database..

I am reading the whole request to the OMElement to save it in the database.

Is that the problem?

How can I fix it? Please help me.
You can fix it by sending the binary data as an attachment.. But even the cached attachment will get loaded to the memory if you are reading the whole request to an OMElement and writing it to the database. You will need to specially handle the cached binary data file..

thanks,
Thilina



Thank you.

Regards,

Simen



From: Thilina Gunarathne [mailto:csethil@gmail.com<ma...@gmail.com>]
Sent: Monday, 11 August 2008 2:01 PM
To: axis-user@ws.apache.org<ma...@ws.apache.org>
Subject: Re: Out Of Memory issue in axis2 1.4



Can anyone please help me? Whats wrong with axis2?

It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data to the memory..

thanks,
Thilina



Thank you.



Regards





--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Thilina Gunarathne - http://thilinag.blogspot.com

Re: Out Of Memory issue in axis2 1.4

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,

> Yes, it is sending inside the soap body rather than an attachment. Why it
> is going inside the soap body? I changed all the required changes to send it
> as separate attachment.
>
> (stub._getServiceClient().getOptions().setProperty(
>
>                               Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);)
>
>
>
> Next question is, eventhough it is sending inside the soap bosy, what the
> problem of it? Is there any size limitation to the soap message?
>
It's the JVM heap size... The message get's loaded in to the memory with
added base64 overhead.  Did you check the message using TCPMON or are you
referring to the message you see in the database..

> I am reading the whole request to the OMElement to save it in the database.
>
> Is that the problem?
>
> How can I fix it? Please help me.
>
You can fix it by sending the binary data as an attachment.. But even the
cached attachment will get loaded to the memory if you are reading the whole
request to an OMElement and writing it to the database. You will need to
specially handle the cached binary data file..

thanks,
Thilina

>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:csethil@gmail.com]
> *Sent:* Monday, 11 August 2008 2:01 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Out Of Memory issue in axis2 1.4
>
>
>
>  Can anyone please help me? Whats wrong with axis2?
>
>  It can be two things...
> 1. Attachment may be going inline with base64 encoding, rather than as an
> attachment. Check the message using tcpmon.(
> http://ws.apache.org/commons/tcpmon)
> 2. Your service implementation might be loading the whole cached binary
> data to the memory..
>
> thanks,
> Thilina
>
>
>
>   Thank you.
>
>
>
> Regards
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

RE: Out Of Memory issue in axis2 1.4

Posted by Shehan Simen <ss...@itree.com.au>.
Hi Thilina,
Yes, it is sending inside the soap body rather than an attachment. Why it is going inside the soap body? I changed all the required changes to send it as separate attachment.
(stub._getServiceClient().getOptions().setProperty(
                              Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);)

Next question is, eventhough it is sending inside the soap bosy, what the problem of it? Is there any size limitation to the soap message?

I am reading the whole request to the OMElement to save it in the database.
Is that the problem?
How can I fix it? Please help me.

Thank you.
Regards,
Simen

From: Thilina Gunarathne [mailto:csethil@gmail.com]
Sent: Monday, 11 August 2008 2:01 PM
To: axis-user@ws.apache.org
Subject: Re: Out Of Memory issue in axis2 1.4

Can anyone please help me? Whats wrong with axis2?
It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an attachment. Check the message using tcpmon.(http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data to the memory..

thanks,
Thilina



Thank you.



Regards





--
Thilina Gunarathne - http://thilinag.blogspot.com

Re: Out Of Memory issue in axis2 1.4

Posted by Thilina Gunarathne <cs...@gmail.com>.
>
> Can anyone please help me? Whats wrong with axis2?
>
It can be two things...
1. Attachment may be going inline with base64 encoding, rather than as an
attachment. Check the message using tcpmon.(
http://ws.apache.org/commons/tcpmon)
2. Your service implementation might be loading the whole cached binary data
to the memory..

thanks,
Thilina

>
>
Thank you.
>
>
>
> Regards
>
>
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com