You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by baeschtu baeschtu <ba...@gmail.com> on 2009/11/27 17:08:00 UTC

MTOM OutOfMemory

Hi list
for a fileupload I need a mtom enabled webservice (wsdl first.) I managed to
write a working wsdl with wsdl2java
When I send large binaries ~5GB I got a:

WARNING: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space

When I check with wireshark, for small files it looks like SwA seams to
work:
MIME Multipart Media Encapsulation, Type: multipart/related, Boundary:
"uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"

When trying to upload large files I see only "Continuation or non-HTTP
traffic" and then follows the OutOfMemory exception.
35506    5625.427090    127.0.0.1    127.0.0.1    HTTP    Continuation or
non-HTTP traffic.

I also have the xmime:expectedContentTypes="application/octet-stream" in and
DataHandlers are generated.
Has someone a working example, or some hints?

Thanks
Bast

Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
This stack trace is on the client side trying to send the message, not on the 
server side.   The cxf.xml and such you sent is for the server side.

What is the code you are using in testVideoUpload?   

I think the key line is: 
org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)

It only gets there if:
if (totalLength < limit || limit == -1) {
Thus, it looks like the configuration of the LoggingOutInterceptor (or logging 
feature) is setting a very high limit (or no limit).

The default limit on the Logging interceptors is 100K.   I think you have to 
go out of your way to set it to something else.  Definitely check your client 
code.

Dan





On Thu December 17 2009 6:28:50 am surajchhetry wrote:
> Iam using CXF 2.2.5 version and try to upload around 5 GB and got following
> error.
> Here is the stack trace
> 
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> 	at java.util.Arrays.copyOf(Arrays.java:2882)
> 	at
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:1
> 00) at
>  java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at
>  java.lang.StringBuilder.append(StringBuilder.java:119)
> 	at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:3
> 34) at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:2
> 86) at
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(Lo
> ggingOutInterceptor.java:152) at
>  org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182) at
>  org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at
>  org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637) at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
> rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> n.java:236) at
>  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483) at
>  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309) at
>  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261) at
>  org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
>  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) at
>  $Proxy57.uploadVideo(Unknown Source)
> 	at
> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTest
> er.java:70) at
> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
> 
> dkulp wrote:
> > This error sounds like a classloader thing.  Check the classpath and such
> > for
> > and activation jars.   If you are on Java6, try removing the activation
> > jar we
> > ship and such and using the stuff built into the jdk.
> >
> > Dan
> >
> > On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
> >> I was getting a step forward while using the reference implementation
> >> large_upload from https://jax-ws.dev.java.net/2.1.7/
> >> Now I have the following problem. (I'm using maven)
> >>
> >> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
> >> doIntercept
> >> WARNING: Application has thrown exception, unwinding now
> >> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
> >> (instance of <bootloader>) previously initiated loading for a different
> >>  type with name "javax/activation/DataHandler"
> >>     at
> >> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvok
> >>er. java:148)
> >>
> >> Any help would be appreciated!
> >>
> >>
> >>
> >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
> >>
> >> > Hi list
> >> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
> >>
> >> managed
> >>
> >> > to write a working wsdl with wsdl2java
> >> > When I send large binaries ~5GB I got a:
> >> >
> >> > WARNING: Interceptor has thrown exception, unwinding now
> >> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space
> >> >
> >> > When I check with wireshark, for small files it looks like SwA seams
> >> > to work:
> >> > MIME Multipart Media Encapsulation, Type: multipart/related, Boundary:
> >> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
> >> >
> >> > When trying to upload large files I see only "Continuation or non-HTTP
> >> > traffic" and then follows the OutOfMemory exception.
> >> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP    Continuation
> >>
> >> or
> >>
> >> > non-HTTP traffic.
> >> >
> >> > I also have the xmime:expectedContentTypes="application/octet-stream"
> >>
> >> in
> >>
> >> > and DataHandlers are generated.
> >> > Has someone a working example, or some hints?
> >> >
> >> > Thanks
> >> > Bast
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Thanks for your support but i think it might be bug.Iam working on it from
few days but without any solution.Iam able to upload around 1 GB but after
that it just making me mad :,( .Just waiting for some help.....

bimargulies wrote:
> 
> Now you are outside my expertise. Hopefully someone else will turn up.
> 
> 
> On Thu, Dec 17, 2009 at 9:13 AM, surajchhetry <su...@gmail.com>
> wrote:
>>
>> Logging is turn off but getting Error "Invalid chunk header"
>>
>> surajchhetry wrote:
>>>
>>> Yes Stack trace is same.
>>>
>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>       at java.util.Arrays.copyOf(Arrays.java:2882)
>>>       at
>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>       at
>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>       at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>       at
>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>       at
>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>       at
>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>       at
>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>       at
>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>       at
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>       at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>       at
>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>       at
>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>       at $Proxy57.uploadVideo(Unknown Source)
>>>       at
>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>       at
>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> The same stack trace with the same LoggingOutInterceptor on the stack?
>>>>
>>>> On Thu, Dec 17, 2009 at 8:37 AM, surajchhetry <su...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Here is my CXF spring Configuration
>>>>>
>>>>> <!-- Load CXF modules from cxf.jar -->
>>>>>    <import resource="classpath:META-INF/cxf/cxf.xml"/>
>>>>>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
>>>>>    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>>>>>    <import
>>>>> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
>>>>>
>>>>>    <cxf:bus>
>>>>>        <cxf:features>
>>>>>            <cxf:logging />
>>>>>        </cxf:features>
>>>>>    </cxf:bus>
>>>>>
>>>>> <jaxws:endpoint id="fileTransferWebServiceEndpoint"
>>>>>                    serviceName="upload"
>>>>>
>>>>> implementorClass="com.suraj.ws.testapi.fileTransfer.UploadService"
>>>>>                    implementor="#fileService"
>>>>>                    address="/services/upload">
>>>>>        <jaxws:serviceFactory>
>>>>>            <ref bean="jaxws-and-aegis-service-factory"/>
>>>>>        </jaxws:serviceFactory>
>>>>>
>>>>>        <jaxws:properties>
>>>>>            <entry key="mtom-enabled" value="true"/>
>>>>>            <entry key="attachment-directory" value="~temp"/>
>>>>>            <entry key="attachment-memory-threshold" value="400"/>
>>>>>            <entry key="org.apache.cxf.output.buffering" value="true"/>
>>>>>            <entry key="org.apache.cxf.output.serviceloader-context"
>>>>> value="true"/>
>>>>>        </jaxws:properties>
>>>>>    </jaxws:endpoint>
>>>>>
>>>>>
>>>>> And I removed
>>>>>  <cxf:bus>
>>>>>        <cxf:features>
>>>>>            <cxf:logging />
>>>>>        </cxf:features>
>>>>>    </cxf:bus>
>>>>> but same problem
>>>>>
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> It looks like you turned it on. You have the logging feature enabled,
>>>>>> or you have explicitly added the LoggingOutInterceptor somewhere.
>>>>>> Unless we have some mechanism that does this by default that I'm not
>>>>>> aware of.
>>>>>>
>>>>>> On Thu, Dec 17, 2009 at 7:58 AM, surajchhetry
>>>>>> <su...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Could you tell me how to do that?
>>>>>>>
>>>>>>> bimargulies wrote:
>>>>>>>>
>>>>>>>> Better turn off the logging interceptor.
>>>>>>>>
>>>>>>>> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry
>>>>>>>> <su...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>>>>>>>>> following
>>>>>>>>> error.
>>>>>>>>> Here is the stack trace
>>>>>>>>>
>>>>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>>>>> space
>>>>>>>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>>>>>>>        at
>>>>>>>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>>>>>>>        at
>>>>>>>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>>>>>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>>>>>>>        at
>>>>>>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>>>>>>>        at $Proxy57.uploadVideo(Unknown Source)
>>>>>>>>>        at
>>>>>>>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>>>>>>>        at
>>>>>>>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> dkulp wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> This error sounds like a classloader thing.  Check the classpath
>>>>>>>>>> and
>>>>>>>>>> such
>>>>>>>>>> for
>>>>>>>>>> and activation jars.   If you are on Java6, try removing the
>>>>>>>>>> activation
>>>>>>>>>> jar we
>>>>>>>>>> ship and such and using the stuff built into the jdk.
>>>>>>>>>>
>>>>>>>>>> Dan
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>>>>>>>>> I was getting a step forward while using the reference
>>>>>>>>>>> implementation
>>>>>>>>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>>>>>>>>> Now I have the following problem. (I'm using maven)
>>>>>>>>>>>
>>>>>>>>>>> Nov 28, 2009 9:44:32 PM
>>>>>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain
>>>>>>>>>>> doIntercept
>>>>>>>>>>> WARNING: Application has thrown exception, unwinding now
>>>>>>>>>>> org.apache.cxf.interceptor.Fault: loader constraint violation:
>>>>>>>>>>> loader
>>>>>>>>>>> (instance of <bootloader>) previously initiated loading for a
>>>>>>>>>>> different
>>>>>>>>>>>  type with name "javax/activation/DataHandler"
>>>>>>>>>>>     at
>>>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>>>>>>>>> java:148)
>>>>>>>>>>>
>>>>>>>>>>> Any help would be appreciated!
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>>>>>>>>
>>>>>>>>>>> > Hi list
>>>>>>>>>>> > for a fileupload I need a mtom enabled webservice (wsdl
>>>>>>>>>>> first.)
>>>>>>>>>>> I
>>>>>>>>>>> managed
>>>>>>>>>>> > to write a working wsdl with wsdl2java
>>>>>>>>>>> > When I send large binaries ~5GB I got a:
>>>>>>>>>>> >
>>>>>>>>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>>>>>>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java
>>>>>>>>>>> heap
>>>>>>>>>>> space
>>>>>>>>>>> >
>>>>>>>>>>> > When I check with wireshark, for small files it looks like SwA
>>>>>>>>>>> seams
>>>>>>>>>>> to
>>>>>>>>>>> > work:
>>>>>>>>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>>>>>>>>> Boundary:
>>>>>>>>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>>>>>>>>> >
>>>>>>>>>>> > When trying to upload large files I see only "Continuation or
>>>>>>>>>>> non-HTTP
>>>>>>>>>>> > traffic" and then follows the OutOfMemory exception.
>>>>>>>>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP
>>>>>>>>>>>  Continuation
>>>>>>>>>>> or
>>>>>>>>>>> > non-HTTP traffic.
>>>>>>>>>>> >
>>>>>>>>>>> > I also have the
>>>>>>>>>>> xmime:expectedContentTypes="application/octet-stream"
>>>>>>>>>>> in
>>>>>>>>>>> > and DataHandlers are generated.
>>>>>>>>>>> > Has someone a working example, or some hints?
>>>>>>>>>>> >
>>>>>>>>>>> > Thanks
>>>>>>>>>>> > Bast
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Daniel Kulp
>>>>>>>>>> dkulp@apache.org
>>>>>>>>>> http://www.dankulp.com/blog
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828087.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828571.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26830242.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Benson Margulies <bi...@gmail.com>.
Now you are outside my expertise. Hopefully someone else will turn up.


On Thu, Dec 17, 2009 at 9:13 AM, surajchhetry <su...@gmail.com> wrote:
>
> Logging is turn off but getting Error "Invalid chunk header"
>
> surajchhetry wrote:
>>
>> Yes Stack trace is same.
>>
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>       at java.util.Arrays.copyOf(Arrays.java:2882)
>>       at
>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>       at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>       at java.lang.StringBuilder.append(StringBuilder.java:119)
>>       at
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>       at
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>       at
>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>       at
>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>       at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>       at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>       at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>       at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>       at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>       at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>       at $Proxy57.uploadVideo(Unknown Source)
>>       at
>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>       at
>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>
>>
>> bimargulies wrote:
>>>
>>> The same stack trace with the same LoggingOutInterceptor on the stack?
>>>
>>> On Thu, Dec 17, 2009 at 8:37 AM, surajchhetry <su...@gmail.com>
>>> wrote:
>>>>
>>>> Here is my CXF spring Configuration
>>>>
>>>> <!-- Load CXF modules from cxf.jar -->
>>>>    <import resource="classpath:META-INF/cxf/cxf.xml"/>
>>>>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
>>>>    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>>>>    <import
>>>> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
>>>>
>>>>    <cxf:bus>
>>>>        <cxf:features>
>>>>            <cxf:logging />
>>>>        </cxf:features>
>>>>    </cxf:bus>
>>>>
>>>> <jaxws:endpoint id="fileTransferWebServiceEndpoint"
>>>>                    serviceName="upload"
>>>>
>>>> implementorClass="com.suraj.ws.testapi.fileTransfer.UploadService"
>>>>                    implementor="#fileService"
>>>>                    address="/services/upload">
>>>>        <jaxws:serviceFactory>
>>>>            <ref bean="jaxws-and-aegis-service-factory"/>
>>>>        </jaxws:serviceFactory>
>>>>
>>>>        <jaxws:properties>
>>>>            <entry key="mtom-enabled" value="true"/>
>>>>            <entry key="attachment-directory" value="~temp"/>
>>>>            <entry key="attachment-memory-threshold" value="400"/>
>>>>            <entry key="org.apache.cxf.output.buffering" value="true"/>
>>>>            <entry key="org.apache.cxf.output.serviceloader-context"
>>>> value="true"/>
>>>>        </jaxws:properties>
>>>>    </jaxws:endpoint>
>>>>
>>>>
>>>> And I removed
>>>>  <cxf:bus>
>>>>        <cxf:features>
>>>>            <cxf:logging />
>>>>        </cxf:features>
>>>>    </cxf:bus>
>>>> but same problem
>>>>
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> It looks like you turned it on. You have the logging feature enabled,
>>>>> or you have explicitly added the LoggingOutInterceptor somewhere.
>>>>> Unless we have some mechanism that does this by default that I'm not
>>>>> aware of.
>>>>>
>>>>> On Thu, Dec 17, 2009 at 7:58 AM, surajchhetry <su...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Could you tell me how to do that?
>>>>>>
>>>>>> bimargulies wrote:
>>>>>>>
>>>>>>> Better turn off the logging interceptor.
>>>>>>>
>>>>>>> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry
>>>>>>> <su...@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>>>>>>>> following
>>>>>>>> error.
>>>>>>>> Here is the stack trace
>>>>>>>>
>>>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>>>> space
>>>>>>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>>>>>>        at
>>>>>>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>>>>>>        at
>>>>>>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>>>>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>>>>>>        at
>>>>>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>>>>>>        at $Proxy57.uploadVideo(Unknown Source)
>>>>>>>>        at
>>>>>>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>>>>>>        at
>>>>>>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>>>>>>
>>>>>>>>
>>>>>>>> dkulp wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> This error sounds like a classloader thing.  Check the classpath
>>>>>>>>> and
>>>>>>>>> such
>>>>>>>>> for
>>>>>>>>> and activation jars.   If you are on Java6, try removing the
>>>>>>>>> activation
>>>>>>>>> jar we
>>>>>>>>> ship and such and using the stuff built into the jdk.
>>>>>>>>>
>>>>>>>>> Dan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>>>>>>>> I was getting a step forward while using the reference
>>>>>>>>>> implementation
>>>>>>>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>>>>>>>> Now I have the following problem. (I'm using maven)
>>>>>>>>>>
>>>>>>>>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>>>>>>>>> doIntercept
>>>>>>>>>> WARNING: Application has thrown exception, unwinding now
>>>>>>>>>> org.apache.cxf.interceptor.Fault: loader constraint violation:
>>>>>>>>>> loader
>>>>>>>>>> (instance of <bootloader>) previously initiated loading for a
>>>>>>>>>> different
>>>>>>>>>>  type with name "javax/activation/DataHandler"
>>>>>>>>>>     at
>>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>>>>>>>> java:148)
>>>>>>>>>>
>>>>>>>>>> Any help would be appreciated!
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>>>>>>>
>>>>>>>>>> > Hi list
>>>>>>>>>> > for a fileupload I need a mtom enabled webservice (wsdl first.)
>>>>>>>>>> I
>>>>>>>>>> managed
>>>>>>>>>> > to write a working wsdl with wsdl2java
>>>>>>>>>> > When I send large binaries ~5GB I got a:
>>>>>>>>>> >
>>>>>>>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>>>>>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap
>>>>>>>>>> space
>>>>>>>>>> >
>>>>>>>>>> > When I check with wireshark, for small files it looks like SwA
>>>>>>>>>> seams
>>>>>>>>>> to
>>>>>>>>>> > work:
>>>>>>>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>>>>>>>> Boundary:
>>>>>>>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>>>>>>>> >
>>>>>>>>>> > When trying to upload large files I see only "Continuation or
>>>>>>>>>> non-HTTP
>>>>>>>>>> > traffic" and then follows the OutOfMemory exception.
>>>>>>>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP
>>>>>>>>>>  Continuation
>>>>>>>>>> or
>>>>>>>>>> > non-HTTP traffic.
>>>>>>>>>> >
>>>>>>>>>> > I also have the
>>>>>>>>>> xmime:expectedContentTypes="application/octet-stream"
>>>>>>>>>> in
>>>>>>>>>> > and DataHandlers are generated.
>>>>>>>>>> > Has someone a working example, or some hints?
>>>>>>>>>> >
>>>>>>>>>> > Thanks
>>>>>>>>>> > Bast
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Daniel Kulp
>>>>>>>>> dkulp@apache.org
>>>>>>>>> http://www.dankulp.com/blog
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828087.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828571.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Logging is turn off but getting Error "Invalid chunk header"

surajchhetry wrote:
> 
> Yes Stack trace is same.
> 
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> 	at java.util.Arrays.copyOf(Arrays.java:2882)
> 	at
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
> 	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
> 	at java.lang.StringBuilder.append(StringBuilder.java:119)
> 	at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
> 	at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
> 	at
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
> 	at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
> 	at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy57.uploadVideo(Unknown Source)
> 	at
> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
> 	at
> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
> 
> 
> bimargulies wrote:
>> 
>> The same stack trace with the same LoggingOutInterceptor on the stack?
>> 
>> On Thu, Dec 17, 2009 at 8:37 AM, surajchhetry <su...@gmail.com>
>> wrote:
>>>
>>> Here is my CXF spring Configuration
>>>
>>> <!-- Load CXF modules from cxf.jar -->
>>>    <import resource="classpath:META-INF/cxf/cxf.xml"/>
>>>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
>>>    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>>>    <import
>>> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
>>>
>>>    <cxf:bus>
>>>        <cxf:features>
>>>            <cxf:logging />
>>>        </cxf:features>
>>>    </cxf:bus>
>>>
>>> <jaxws:endpoint id="fileTransferWebServiceEndpoint"
>>>                    serviceName="upload"
>>>
>>> implementorClass="com.suraj.ws.testapi.fileTransfer.UploadService"
>>>                    implementor="#fileService"
>>>                    address="/services/upload">
>>>        <jaxws:serviceFactory>
>>>            <ref bean="jaxws-and-aegis-service-factory"/>
>>>        </jaxws:serviceFactory>
>>>
>>>        <jaxws:properties>
>>>            <entry key="mtom-enabled" value="true"/>
>>>            <entry key="attachment-directory" value="~temp"/>
>>>            <entry key="attachment-memory-threshold" value="400"/>
>>>            <entry key="org.apache.cxf.output.buffering" value="true"/>
>>>            <entry key="org.apache.cxf.output.serviceloader-context"
>>> value="true"/>
>>>        </jaxws:properties>
>>>    </jaxws:endpoint>
>>>
>>>
>>> And I removed
>>>  <cxf:bus>
>>>        <cxf:features>
>>>            <cxf:logging />
>>>        </cxf:features>
>>>    </cxf:bus>
>>> but same problem
>>>
>>>
>>> bimargulies wrote:
>>>>
>>>> It looks like you turned it on. You have the logging feature enabled,
>>>> or you have explicitly added the LoggingOutInterceptor somewhere.
>>>> Unless we have some mechanism that does this by default that I'm not
>>>> aware of.
>>>>
>>>> On Thu, Dec 17, 2009 at 7:58 AM, surajchhetry <su...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Could you tell me how to do that?
>>>>>
>>>>> bimargulies wrote:
>>>>>>
>>>>>> Better turn off the logging interceptor.
>>>>>>
>>>>>> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry
>>>>>> <su...@gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>>>>>>> following
>>>>>>> error.
>>>>>>> Here is the stack trace
>>>>>>>
>>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>>> space
>>>>>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>>>>>        at
>>>>>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>>>>>        at
>>>>>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>>>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>>>>>        at
>>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>>>>>        at
>>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>>>>>        at
>>>>>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>>>>>        at
>>>>>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>>>>>        at
>>>>>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>>>>>        at
>>>>>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>>>>>        at
>>>>>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>>>>>        at
>>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>>>>>        at
>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>>>>>        at
>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>>>>>        at
>>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>>>>>        at
>>>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>>>>>        at
>>>>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>>>>>        at $Proxy57.uploadVideo(Unknown Source)
>>>>>>>        at
>>>>>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>>>>>        at
>>>>>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>>>>>
>>>>>>>
>>>>>>> dkulp wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> This error sounds like a classloader thing.  Check the classpath
>>>>>>>> and
>>>>>>>> such
>>>>>>>> for
>>>>>>>> and activation jars.   If you are on Java6, try removing the
>>>>>>>> activation
>>>>>>>> jar we
>>>>>>>> ship and such and using the stuff built into the jdk.
>>>>>>>>
>>>>>>>> Dan
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>>>>>>> I was getting a step forward while using the reference
>>>>>>>>> implementation
>>>>>>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>>>>>>> Now I have the following problem. (I'm using maven)
>>>>>>>>>
>>>>>>>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>>>>>>>> doIntercept
>>>>>>>>> WARNING: Application has thrown exception, unwinding now
>>>>>>>>> org.apache.cxf.interceptor.Fault: loader constraint violation:
>>>>>>>>> loader
>>>>>>>>> (instance of <bootloader>) previously initiated loading for a
>>>>>>>>> different
>>>>>>>>>  type with name "javax/activation/DataHandler"
>>>>>>>>>     at
>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>>>>>>> java:148)
>>>>>>>>>
>>>>>>>>> Any help would be appreciated!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>>>>>>
>>>>>>>>> > Hi list
>>>>>>>>> > for a fileupload I need a mtom enabled webservice (wsdl first.)
>>>>>>>>> I
>>>>>>>>> managed
>>>>>>>>> > to write a working wsdl with wsdl2java
>>>>>>>>> > When I send large binaries ~5GB I got a:
>>>>>>>>> >
>>>>>>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>>>>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap
>>>>>>>>> space
>>>>>>>>> >
>>>>>>>>> > When I check with wireshark, for small files it looks like SwA
>>>>>>>>> seams
>>>>>>>>> to
>>>>>>>>> > work:
>>>>>>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>>>>>>> Boundary:
>>>>>>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>>>>>>> >
>>>>>>>>> > When trying to upload large files I see only "Continuation or
>>>>>>>>> non-HTTP
>>>>>>>>> > traffic" and then follows the OutOfMemory exception.
>>>>>>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP
>>>>>>>>>  Continuation
>>>>>>>>> or
>>>>>>>>> > non-HTTP traffic.
>>>>>>>>> >
>>>>>>>>> > I also have the
>>>>>>>>> xmime:expectedContentTypes="application/octet-stream"
>>>>>>>>> in
>>>>>>>>> > and DataHandlers are generated.
>>>>>>>>> > Has someone a working example, or some hints?
>>>>>>>>> >
>>>>>>>>> > Thanks
>>>>>>>>> > Bast
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Daniel Kulp
>>>>>>>> dkulp@apache.org
>>>>>>>> http://www.dankulp.com/blog
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828087.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828571.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Yes Stack trace is same.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2882)
	at
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
	at java.lang.StringBuilder.append(StringBuilder.java:119)
	at
org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
	at
org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
	at
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
	at $Proxy57.uploadVideo(Unknown Source)
	at
com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
	at
com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)


bimargulies wrote:
> 
> The same stack trace with the same LoggingOutInterceptor on the stack?
> 
> On Thu, Dec 17, 2009 at 8:37 AM, surajchhetry <su...@gmail.com>
> wrote:
>>
>> Here is my CXF spring Configuration
>>
>> <!-- Load CXF modules from cxf.jar -->
>>    <import resource="classpath:META-INF/cxf/cxf.xml"/>
>>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
>>    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>>    <import
>> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
>>
>>    <cxf:bus>
>>        <cxf:features>
>>            <cxf:logging />
>>        </cxf:features>
>>    </cxf:bus>
>>
>> <jaxws:endpoint id="fileTransferWebServiceEndpoint"
>>                    serviceName="upload"
>>
>> implementorClass="com.suraj.ws.testapi.fileTransfer.UploadService"
>>                    implementor="#fileService"
>>                    address="/services/upload">
>>        <jaxws:serviceFactory>
>>            <ref bean="jaxws-and-aegis-service-factory"/>
>>        </jaxws:serviceFactory>
>>
>>        <jaxws:properties>
>>            <entry key="mtom-enabled" value="true"/>
>>            <entry key="attachment-directory" value="~temp"/>
>>            <entry key="attachment-memory-threshold" value="400"/>
>>            <entry key="org.apache.cxf.output.buffering" value="true"/>
>>            <entry key="org.apache.cxf.output.serviceloader-context"
>> value="true"/>
>>        </jaxws:properties>
>>    </jaxws:endpoint>
>>
>>
>> And I removed
>>  <cxf:bus>
>>        <cxf:features>
>>            <cxf:logging />
>>        </cxf:features>
>>    </cxf:bus>
>> but same problem
>>
>>
>> bimargulies wrote:
>>>
>>> It looks like you turned it on. You have the logging feature enabled,
>>> or you have explicitly added the LoggingOutInterceptor somewhere.
>>> Unless we have some mechanism that does this by default that I'm not
>>> aware of.
>>>
>>> On Thu, Dec 17, 2009 at 7:58 AM, surajchhetry <su...@gmail.com>
>>> wrote:
>>>>
>>>> Could you tell me how to do that?
>>>>
>>>> bimargulies wrote:
>>>>>
>>>>> Better turn off the logging interceptor.
>>>>>
>>>>> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry <su...@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>>>>>> following
>>>>>> error.
>>>>>> Here is the stack trace
>>>>>>
>>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>>>>>> space
>>>>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>>>>        at
>>>>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>>>>        at
>>>>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>>>>        at
>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>>>>        at
>>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>>>>        at
>>>>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>>>>        at
>>>>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>>>>        at
>>>>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>>>>        at
>>>>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>>>>        at
>>>>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>>>>        at
>>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>>>>        at
>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>>>>        at
>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>>>>        at
>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>>>>        at
>>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>>>>        at
>>>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>>>>        at $Proxy57.uploadVideo(Unknown Source)
>>>>>>        at
>>>>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>>>>        at
>>>>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>>>>
>>>>>>
>>>>>> dkulp wrote:
>>>>>>>
>>>>>>>
>>>>>>> This error sounds like a classloader thing.  Check the classpath and
>>>>>>> such
>>>>>>> for
>>>>>>> and activation jars.   If you are on Java6, try removing the
>>>>>>> activation
>>>>>>> jar we
>>>>>>> ship and such and using the stuff built into the jdk.
>>>>>>>
>>>>>>> Dan
>>>>>>>
>>>>>>>
>>>>>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>>>>>> I was getting a step forward while using the reference
>>>>>>>> implementation
>>>>>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>>>>>> Now I have the following problem. (I'm using maven)
>>>>>>>>
>>>>>>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>>>>>>> doIntercept
>>>>>>>> WARNING: Application has thrown exception, unwinding now
>>>>>>>> org.apache.cxf.interceptor.Fault: loader constraint violation:
>>>>>>>> loader
>>>>>>>> (instance of <bootloader>) previously initiated loading for a
>>>>>>>> different
>>>>>>>>  type with name "javax/activation/DataHandler"
>>>>>>>>     at
>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>>>>>> java:148)
>>>>>>>>
>>>>>>>> Any help would be appreciated!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>>>>>
>>>>>>>> > Hi list
>>>>>>>> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
>>>>>>>> managed
>>>>>>>> > to write a working wsdl with wsdl2java
>>>>>>>> > When I send large binaries ~5GB I got a:
>>>>>>>> >
>>>>>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>>>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap
>>>>>>>> space
>>>>>>>> >
>>>>>>>> > When I check with wireshark, for small files it looks like SwA
>>>>>>>> seams
>>>>>>>> to
>>>>>>>> > work:
>>>>>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>>>>>> Boundary:
>>>>>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>>>>>> >
>>>>>>>> > When trying to upload large files I see only "Continuation or
>>>>>>>> non-HTTP
>>>>>>>> > traffic" and then follows the OutOfMemory exception.
>>>>>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP
>>>>>>>>  Continuation
>>>>>>>> or
>>>>>>>> > non-HTTP traffic.
>>>>>>>> >
>>>>>>>> > I also have the
>>>>>>>> xmime:expectedContentTypes="application/octet-stream"
>>>>>>>> in
>>>>>>>> > and DataHandlers are generated.
>>>>>>>> > Has someone a working example, or some hints?
>>>>>>>> >
>>>>>>>> > Thanks
>>>>>>>> > Bast
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Daniel Kulp
>>>>>>> dkulp@apache.org
>>>>>>> http://www.dankulp.com/blog
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828087.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828305.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Benson Margulies <bi...@gmail.com>.
The same stack trace with the same LoggingOutInterceptor on the stack?

On Thu, Dec 17, 2009 at 8:37 AM, surajchhetry <su...@gmail.com> wrote:
>
> Here is my CXF spring Configuration
>
> <!-- Load CXF modules from cxf.jar -->
>    <import resource="classpath:META-INF/cxf/cxf.xml"/>
>    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
>    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>    <import
> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
>
>    <cxf:bus>
>        <cxf:features>
>            <cxf:logging />
>        </cxf:features>
>    </cxf:bus>
>
> <jaxws:endpoint id="fileTransferWebServiceEndpoint"
>                    serviceName="upload"
>
> implementorClass="com.suraj.ws.testapi.fileTransfer.UploadService"
>                    implementor="#fileService"
>                    address="/services/upload">
>        <jaxws:serviceFactory>
>            <ref bean="jaxws-and-aegis-service-factory"/>
>        </jaxws:serviceFactory>
>
>        <jaxws:properties>
>            <entry key="mtom-enabled" value="true"/>
>            <entry key="attachment-directory" value="~temp"/>
>            <entry key="attachment-memory-threshold" value="400"/>
>            <entry key="org.apache.cxf.output.buffering" value="true"/>
>            <entry key="org.apache.cxf.output.serviceloader-context"
> value="true"/>
>        </jaxws:properties>
>    </jaxws:endpoint>
>
>
> And I removed
>  <cxf:bus>
>        <cxf:features>
>            <cxf:logging />
>        </cxf:features>
>    </cxf:bus>
> but same problem
>
>
> bimargulies wrote:
>>
>> It looks like you turned it on. You have the logging feature enabled,
>> or you have explicitly added the LoggingOutInterceptor somewhere.
>> Unless we have some mechanism that does this by default that I'm not
>> aware of.
>>
>> On Thu, Dec 17, 2009 at 7:58 AM, surajchhetry <su...@gmail.com>
>> wrote:
>>>
>>> Could you tell me how to do that?
>>>
>>> bimargulies wrote:
>>>>
>>>> Better turn off the logging interceptor.
>>>>
>>>> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry <su...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>>>>> following
>>>>> error.
>>>>> Here is the stack trace
>>>>>
>>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>>>        at
>>>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>>>        at
>>>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>>>        at
>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>>>        at
>>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>>>        at
>>>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>>>        at
>>>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>>>        at
>>>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>>>        at
>>>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>>>        at
>>>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>>>        at
>>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>>>        at
>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>>>        at
>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>>>        at
>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>>>        at
>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>>>        at
>>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>>>        at $Proxy57.uploadVideo(Unknown Source)
>>>>>        at
>>>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>>>        at
>>>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>>>
>>>>>
>>>>> dkulp wrote:
>>>>>>
>>>>>>
>>>>>> This error sounds like a classloader thing.  Check the classpath and
>>>>>> such
>>>>>> for
>>>>>> and activation jars.   If you are on Java6, try removing the
>>>>>> activation
>>>>>> jar we
>>>>>> ship and such and using the stuff built into the jdk.
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>>>>> I was getting a step forward while using the reference implementation
>>>>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>>>>> Now I have the following problem. (I'm using maven)
>>>>>>>
>>>>>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>>>>>> doIntercept
>>>>>>> WARNING: Application has thrown exception, unwinding now
>>>>>>> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
>>>>>>> (instance of <bootloader>) previously initiated loading for a
>>>>>>> different
>>>>>>>  type with name "javax/activation/DataHandler"
>>>>>>>     at
>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>>>>> java:148)
>>>>>>>
>>>>>>> Any help would be appreciated!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>>>>
>>>>>>> > Hi list
>>>>>>> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
>>>>>>> managed
>>>>>>> > to write a working wsdl with wsdl2java
>>>>>>> > When I send large binaries ~5GB I got a:
>>>>>>> >
>>>>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap
>>>>>>> space
>>>>>>> >
>>>>>>> > When I check with wireshark, for small files it looks like SwA
>>>>>>> seams
>>>>>>> to
>>>>>>> > work:
>>>>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>>>>> Boundary:
>>>>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>>>>> >
>>>>>>> > When trying to upload large files I see only "Continuation or
>>>>>>> non-HTTP
>>>>>>> > traffic" and then follows the OutOfMemory exception.
>>>>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP
>>>>>>>  Continuation
>>>>>>> or
>>>>>>> > non-HTTP traffic.
>>>>>>> >
>>>>>>> > I also have the
>>>>>>> xmime:expectedContentTypes="application/octet-stream"
>>>>>>> in
>>>>>>> > and DataHandlers are generated.
>>>>>>> > Has someone a working example, or some hints?
>>>>>>> >
>>>>>>> > Thanks
>>>>>>> > Bast
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Daniel Kulp
>>>>>> dkulp@apache.org
>>>>>> http://www.dankulp.com/blog
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828087.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Here is my CXF spring Configuration

<!-- Load CXF modules from cxf.jar -->
    <import resource="classpath:META-INF/cxf/cxf.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
    <import
resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>

    <cxf:bus>
        <cxf:features>
            <cxf:logging />
        </cxf:features>
    </cxf:bus>

<jaxws:endpoint id="fileTransferWebServiceEndpoint"
                    serviceName="upload"
                   
implementorClass="com.suraj.ws.testapi.fileTransfer.UploadService"
                    implementor="#fileService"
                    address="/services/upload">
        <jaxws:serviceFactory>
            <ref bean="jaxws-and-aegis-service-factory"/>
        </jaxws:serviceFactory>
        
        <jaxws:properties>
            <entry key="mtom-enabled" value="true"/>
            <entry key="attachment-directory" value="~temp"/>
            <entry key="attachment-memory-threshold" value="400"/>
            <entry key="org.apache.cxf.output.buffering" value="true"/>
            <entry key="org.apache.cxf.output.serviceloader-context"
value="true"/>
        </jaxws:properties>
    </jaxws:endpoint>


And I removed  
 <cxf:bus>
        <cxf:features>
            <cxf:logging />
        </cxf:features>
    </cxf:bus>
but same problem


bimargulies wrote:
> 
> It looks like you turned it on. You have the logging feature enabled,
> or you have explicitly added the LoggingOutInterceptor somewhere.
> Unless we have some mechanism that does this by default that I'm not
> aware of.
> 
> On Thu, Dec 17, 2009 at 7:58 AM, surajchhetry <su...@gmail.com>
> wrote:
>>
>> Could you tell me how to do that?
>>
>> bimargulies wrote:
>>>
>>> Better turn off the logging interceptor.
>>>
>>> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry <su...@gmail.com>
>>> wrote:
>>>>
>>>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>>>> following
>>>> error.
>>>> Here is the stack trace
>>>>
>>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>>        at
>>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>>        at
>>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>>        at
>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>>        at
>>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>>        at
>>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>>        at
>>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>>        at
>>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>>        at
>>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>>        at
>>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>>        at
>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>>        at
>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>>        at
>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>>        at
>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>>        at
>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>>        at
>>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>>        at $Proxy57.uploadVideo(Unknown Source)
>>>>        at
>>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>>        at
>>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>>
>>>>
>>>> dkulp wrote:
>>>>>
>>>>>
>>>>> This error sounds like a classloader thing.  Check the classpath and
>>>>> such
>>>>> for
>>>>> and activation jars.   If you are on Java6, try removing the
>>>>> activation
>>>>> jar we
>>>>> ship and such and using the stuff built into the jdk.
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>>>> I was getting a step forward while using the reference implementation
>>>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>>>> Now I have the following problem. (I'm using maven)
>>>>>>
>>>>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>>>>> doIntercept
>>>>>> WARNING: Application has thrown exception, unwinding now
>>>>>> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
>>>>>> (instance of <bootloader>) previously initiated loading for a
>>>>>> different
>>>>>>  type with name "javax/activation/DataHandler"
>>>>>>     at
>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>>>> java:148)
>>>>>>
>>>>>> Any help would be appreciated!
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>>>
>>>>>> > Hi list
>>>>>> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
>>>>>> managed
>>>>>> > to write a working wsdl with wsdl2java
>>>>>> > When I send large binaries ~5GB I got a:
>>>>>> >
>>>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap
>>>>>> space
>>>>>> >
>>>>>> > When I check with wireshark, for small files it looks like SwA
>>>>>> seams
>>>>>> to
>>>>>> > work:
>>>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>>>> Boundary:
>>>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>>>> >
>>>>>> > When trying to upload large files I see only "Continuation or
>>>>>> non-HTTP
>>>>>> > traffic" and then follows the OutOfMemory exception.
>>>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP
>>>>>>  Continuation
>>>>>> or
>>>>>> > non-HTTP traffic.
>>>>>> >
>>>>>> > I also have the
>>>>>> xmime:expectedContentTypes="application/octet-stream"
>>>>>> in
>>>>>> > and DataHandlers are generated.
>>>>>> > Has someone a working example, or some hints?
>>>>>> >
>>>>>> > Thanks
>>>>>> > Bast
>>>>>>
>>>>>
>>>>> --
>>>>> Daniel Kulp
>>>>> dkulp@apache.org
>>>>> http://www.dankulp.com/blog
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26828087.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Benson Margulies <bi...@gmail.com>.
It looks like you turned it on. You have the logging feature enabled,
or you have explicitly added the LoggingOutInterceptor somewhere.
Unless we have some mechanism that does this by default that I'm not
aware of.

On Thu, Dec 17, 2009 at 7:58 AM, surajchhetry <su...@gmail.com> wrote:
>
> Could you tell me how to do that?
>
> bimargulies wrote:
>>
>> Better turn off the logging interceptor.
>>
>> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry <su...@gmail.com>
>> wrote:
>>>
>>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>>> following
>>> error.
>>> Here is the stack trace
>>>
>>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>>        at
>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>        at
>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>>        at
>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>        at
>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>        at
>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>        at
>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>        at
>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>        at
>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>        at
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>        at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>        at
>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>        at
>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>        at $Proxy57.uploadVideo(Unknown Source)
>>>        at
>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>        at
>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>>
>>>
>>> dkulp wrote:
>>>>
>>>>
>>>> This error sounds like a classloader thing.  Check the classpath and
>>>> such
>>>> for
>>>> and activation jars.   If you are on Java6, try removing the activation
>>>> jar we
>>>> ship and such and using the stuff built into the jdk.
>>>>
>>>> Dan
>>>>
>>>>
>>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>>> I was getting a step forward while using the reference implementation
>>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>>> Now I have the following problem. (I'm using maven)
>>>>>
>>>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>>>> doIntercept
>>>>> WARNING: Application has thrown exception, unwinding now
>>>>> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
>>>>> (instance of <bootloader>) previously initiated loading for a different
>>>>>  type with name "javax/activation/DataHandler"
>>>>>     at
>>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>>> java:148)
>>>>>
>>>>> Any help would be appreciated!
>>>>>
>>>>>
>>>>>
>>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>>
>>>>> > Hi list
>>>>> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
>>>>> managed
>>>>> > to write a working wsdl with wsdl2java
>>>>> > When I send large binaries ~5GB I got a:
>>>>> >
>>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap
>>>>> space
>>>>> >
>>>>> > When I check with wireshark, for small files it looks like SwA seams
>>>>> to
>>>>> > work:
>>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>>> Boundary:
>>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>>> >
>>>>> > When trying to upload large files I see only "Continuation or
>>>>> non-HTTP
>>>>> > traffic" and then follows the OutOfMemory exception.
>>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP
>>>>>  Continuation
>>>>> or
>>>>> > non-HTTP traffic.
>>>>> >
>>>>> > I also have the xmime:expectedContentTypes="application/octet-stream"
>>>>> in
>>>>> > and DataHandlers are generated.
>>>>> > Has someone a working example, or some hints?
>>>>> >
>>>>> > Thanks
>>>>> > Bast
>>>>>
>>>>
>>>> --
>>>> Daniel Kulp
>>>> dkulp@apache.org
>>>> http://www.dankulp.com/blog
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Could you tell me how to do that? 

bimargulies wrote:
> 
> Better turn off the logging interceptor.
> 
> On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry <su...@gmail.com>
> wrote:
>>
>> Iam using CXF 2.2.5 version and try to upload around 5 GB and got
>> following
>> error.
>> Here is the stack trace
>>
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>>        at java.util.Arrays.copyOf(Arrays.java:2882)
>>        at
>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>        at
>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>>        at
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>        at
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>        at
>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>        at
>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>        at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>        at
>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>        at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>        at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>        at
>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>        at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>        at $Proxy57.uploadVideo(Unknown Source)
>>        at
>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>        at
>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>
>>
>> dkulp wrote:
>>>
>>>
>>> This error sounds like a classloader thing.  Check the classpath and
>>> such
>>> for
>>> and activation jars.   If you are on Java6, try removing the activation
>>> jar we
>>> ship and such and using the stuff built into the jdk.
>>>
>>> Dan
>>>
>>>
>>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>>> I was getting a step forward while using the reference implementation
>>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>>> Now I have the following problem. (I'm using maven)
>>>>
>>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>>> doIntercept
>>>> WARNING: Application has thrown exception, unwinding now
>>>> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
>>>> (instance of <bootloader>) previously initiated loading for a different
>>>>  type with name "javax/activation/DataHandler"
>>>>     at
>>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>>> java:148)
>>>>
>>>> Any help would be appreciated!
>>>>
>>>>
>>>>
>>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>>
>>>> > Hi list
>>>> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
>>>> managed
>>>> > to write a working wsdl with wsdl2java
>>>> > When I send large binaries ~5GB I got a:
>>>> >
>>>> > WARNING: Interceptor has thrown exception, unwinding now
>>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap
>>>> space
>>>> >
>>>> > When I check with wireshark, for small files it looks like SwA seams
>>>> to
>>>> > work:
>>>> > MIME Multipart Media Encapsulation, Type: multipart/related,
>>>> Boundary:
>>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>>> >
>>>> > When trying to upload large files I see only "Continuation or
>>>> non-HTTP
>>>> > traffic" and then follows the OutOfMemory exception.
>>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP  
>>>>  Continuation
>>>> or
>>>> > non-HTTP traffic.
>>>> >
>>>> > I also have the xmime:expectedContentTypes="application/octet-stream"
>>>> in
>>>> > and DataHandlers are generated.
>>>> > Has someone a working example, or some hints?
>>>> >
>>>> > Thanks
>>>> > Bast
>>>>
>>>
>>> --
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26827626.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Benson Margulies <bi...@gmail.com>.
Better turn off the logging interceptor.

On Thu, Dec 17, 2009 at 6:28 AM, surajchhetry <su...@gmail.com> wrote:
>
> Iam using CXF 2.2.5 version and try to upload around 5 GB and got following
> error.
> Here is the stack trace
>
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>        at java.util.Arrays.copyOf(Arrays.java:2882)
>        at
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>        at java.lang.StringBuilder.append(StringBuilder.java:119)
>        at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>        at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>        at
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>        at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>        at $Proxy57.uploadVideo(Unknown Source)
>        at
> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>        at
> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>
>
> dkulp wrote:
>>
>>
>> This error sounds like a classloader thing.  Check the classpath and such
>> for
>> and activation jars.   If you are on Java6, try removing the activation
>> jar we
>> ship and such and using the stuff built into the jdk.
>>
>> Dan
>>
>>
>> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>>> I was getting a step forward while using the reference implementation
>>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>> Now I have the following problem. (I'm using maven)
>>>
>>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>>> doIntercept
>>> WARNING: Application has thrown exception, unwinding now
>>> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
>>> (instance of <bootloader>) previously initiated loading for a different
>>>  type with name "javax/activation/DataHandler"
>>>     at
>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>> java:148)
>>>
>>> Any help would be appreciated!
>>>
>>>
>>>
>>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>>
>>> > Hi list
>>> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
>>> managed
>>> > to write a working wsdl with wsdl2java
>>> > When I send large binaries ~5GB I got a:
>>> >
>>> > WARNING: Interceptor has thrown exception, unwinding now
>>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space
>>> >
>>> > When I check with wireshark, for small files it looks like SwA seams to
>>> > work:
>>> > MIME Multipart Media Encapsulation, Type: multipart/related, Boundary:
>>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>> >
>>> > When trying to upload large files I see only "Continuation or non-HTTP
>>> > traffic" and then follows the OutOfMemory exception.
>>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP    Continuation
>>> or
>>> > non-HTTP traffic.
>>> >
>>> > I also have the xmime:expectedContentTypes="application/octet-stream"
>>> in
>>> > and DataHandlers are generated.
>>> > Has someone a working example, or some hints?
>>> >
>>> > Thanks
>>> > Bast
>>>
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>
> --
> View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
A lot of thank you guys.It worked for me when i removed these two lines.
Really appreciated your help. 

dkulp wrote:
> 
> 
> Try pulling out the lines:
> 
>         factory.getInInterceptors().add(new LoggingInInterceptor());
>         factory.getOutInterceptors().add(new LoggingOutInterceptor());
> 
> and seeing what happens.   Please post the new stack trace.
> 
> 
> Dan
> 
> 
> 
> 
> On Thu December 17 2009 12:43:52 pm surajchhetry wrote:
>> This is my code ....
>> 
>> @Path("/services/upload")
>> @WebService(serviceName = "upload", name = "UploadWebService",
>> targetNamespace = "http://ws.surajchh.com")
>> public interface TestServiceAPI {
>> 
>> 	@Consumes("multipart/form-data")
>> 	@WebMethod(operationName = "video")
>> 	@POST
>> 	@Path("/video")
>> 	@WebResult(name = "UploadedUrl")
>> 
>> 	public String uploadVideo(@WebParam(name = "data") @PathParam("data")
>> @XmlMimeType("application/octet-stream")DataHandler data)	throws
>> ServiceException;
>> }
>> 
>> 
>> ----------------------------
>> 
>> public class TestServiceAPIImpl implements TestServiceAPI {
>> 
>> 	private final Log logger = LogFactory.getLog(this.getClass());
>> 
>> 	@Autowired
>> 	@Qualifier("wsMessageSource")
>> 	private MessageSource messageSource;
>> 
>> 	private String videoPath;
>> 
>> 	@Override
>> 	public String uploadVideo(DataHandler data) throws ServiceException {
>> 		try {
>> 			this.videoPath = 
> messageSource.getMessage("video.rootDirectory", null,
>> null,null);
>> 			this.logger.info("vpath = "+this.videoPath);
>> 			if(videoPath== null)
>> 				throw new ServiceException("Configuration error");
>> 			this.logger.info("Validate.....");
>> 			this.logger.info("Uploading video......");
>> 			this.logger.info("VideoRootPath ="+videoPath);
>> 			this.logger.info("Uploading video......contanint found");
>> 			//InputStream inputStream = dataHandler.getInputStream();
>> 			this.logger.info("Uploading video......inserting video info");
>> 			String url = this.videoService.createVideo(videoInfo);
>> 			this.logger.info("Uploading video......processing upload");
>> 			String uploadPath = this.processUpload(data);
>> 			return uploadPath;
>> 		} catch (Exception e) {
>> 			throw new ServiceException(e.getMessage());
>> 		}
>> 	}
>> 
>> 	private String processUpload(DataHandler dataHandler) throws Exception {
>> 		int videoId = 22;
>> 		String videoPath = this.videoPath+ File.separator + videoId;
>> 		File f = new File(videoPath);
>> 		final String uploadPath = f.getPath() + File.separator + videoId + 
> "."+
>> avi;
>> 		File tempFile = File.createTempFile("upload" + videoId, fileType);
>> 		OutputStream outputStream = new FileOutputStream(tempFile);// new//
>> File(uploadPath)
>> 		synchronized (dataHandler) {
>> 			synchronized (outputStream) {
>> 				byte[] b = new byte[2048];
>> 				while (true) {
>> 					int byteRead = dataHandler.getInputStream().read(b);
>> 					if (byteRead == -1)
>> 						break;
>> 					outputStream.write(b, 0, byteRead);
>> 				}
>> 				outputStream.flush();
>> 				outputStream.close();
>> 				File serverFile = new File(uploadPath);
>> 				tempFile.renameTo(serverFile);
>> 				logger.debug("Uploading Done...");
>> 				return uploadPath;
>> 			}
>> 		}
>> 	}
>> 
>> }
>> 
>> ------------------Testuploader------------------
>> 
>> public class UploadClientTest {
>> 
>> 	public static void main(String args[]) throws Exception {
>> 	       testVideoUpload();
>> 		System.exit(0);
>> 
>> 	}
>> 
>>     private static void testVideoUpload() {
>> 
>>         TestServiceAPI client = createUploadService();
>>         String fileName = System.getProperty("user.home")+
>> File.separator+"Videos"+File.separator+"videos.zip";
>>         System.out.println("File path :" +fileName);
>>         DataSource source = new FileDataSource(new File(fileName));
>>         client.uploadVideo(new DataHandler(source));
>>     }
>> 
>>     private static TestServiceAPI createUploadService() {
>> 
>>         System.out.println("File path :" +s);
>>         long timeout = 100000L;//60000
>> 
>>         Map<String,Object> props = new HashMap<String, Object>();
>>         props.put("mtom-enabled", Boolean.TRUE);
>>         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>> 
>>         factory.getInInterceptors().add(new LoggingInInterceptor());
>>         factory.getOutInterceptors().add(new LoggingOutInterceptor());
>>         factory.setServiceClass(UploadService.class);
>> 
>> factory.setAddress("http://localhost:8080/uplaodTest/api/services/upload");
>>         factory.setProperties(props);
>>         UploadService client = (UploadService) factory.create();
>> 
>>         //
>>         Client clientCfx = ClientProxy.getClient(client);
>>         HTTPConduit conduit = (HTTPConduit) clientCfx.getConduit();
>> 
>>         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>>         httpClientPolicy.setConnectionTimeout(0);
>>         httpClientPolicy.setReceiveTimeout(0);
>>         httpClientPolicy.setAllowChunking(true);
>>         // ((HTTPConduit)
>> factory.getClientFactoryBean().getClient().getConduit()).setClient(httpClie
>> ntPolicy); conduit.setClient(httpClientPolicy);
>>         return client;
>>     }
>> 
>>   }
>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26841764.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
Try pulling out the lines:

        factory.getInInterceptors().add(new LoggingInInterceptor());
        factory.getOutInterceptors().add(new LoggingOutInterceptor());

and seeing what happens.   Please post the new stack trace.


Dan




On Thu December 17 2009 12:43:52 pm surajchhetry wrote:
> This is my code ....
> 
> @Path("/services/upload")
> @WebService(serviceName = "upload", name = "UploadWebService",
> targetNamespace = "http://ws.surajchh.com")
> public interface TestServiceAPI {
> 
> 	@Consumes("multipart/form-data")
> 	@WebMethod(operationName = "video")
> 	@POST
> 	@Path("/video")
> 	@WebResult(name = "UploadedUrl")
> 
> 	public String uploadVideo(@WebParam(name = "data") @PathParam("data")
> @XmlMimeType("application/octet-stream")DataHandler data)	throws
> ServiceException;
> }
> 
> 
> ----------------------------
> 
> public class TestServiceAPIImpl implements TestServiceAPI {
> 
> 	private final Log logger = LogFactory.getLog(this.getClass());
> 
> 	@Autowired
> 	@Qualifier("wsMessageSource")
> 	private MessageSource messageSource;
> 
> 	private String videoPath;
> 
> 	@Override
> 	public String uploadVideo(DataHandler data) throws ServiceException {
> 		try {
> 			this.videoPath = 
messageSource.getMessage("video.rootDirectory", null,
> null,null);
> 			this.logger.info("vpath = "+this.videoPath);
> 			if(videoPath== null)
> 				throw new ServiceException("Configuration error");
> 			this.logger.info("Validate.....");
> 			this.logger.info("Uploading video......");
> 			this.logger.info("VideoRootPath ="+videoPath);
> 			this.logger.info("Uploading video......contanint found");
> 			//InputStream inputStream = dataHandler.getInputStream();
> 			this.logger.info("Uploading video......inserting video info");
> 			String url = this.videoService.createVideo(videoInfo);
> 			this.logger.info("Uploading video......processing upload");
> 			String uploadPath = this.processUpload(data);
> 			return uploadPath;
> 		} catch (Exception e) {
> 			throw new ServiceException(e.getMessage());
> 		}
> 	}
> 
> 	private String processUpload(DataHandler dataHandler) throws Exception {
> 		int videoId = 22;
> 		String videoPath = this.videoPath+ File.separator + videoId;
> 		File f = new File(videoPath);
> 		final String uploadPath = f.getPath() + File.separator + videoId + 
"."+
> avi;
> 		File tempFile = File.createTempFile("upload" + videoId, fileType);
> 		OutputStream outputStream = new FileOutputStream(tempFile);// new//
> File(uploadPath)
> 		synchronized (dataHandler) {
> 			synchronized (outputStream) {
> 				byte[] b = new byte[2048];
> 				while (true) {
> 					int byteRead = dataHandler.getInputStream().read(b);
> 					if (byteRead == -1)
> 						break;
> 					outputStream.write(b, 0, byteRead);
> 				}
> 				outputStream.flush();
> 				outputStream.close();
> 				File serverFile = new File(uploadPath);
> 				tempFile.renameTo(serverFile);
> 				logger.debug("Uploading Done...");
> 				return uploadPath;
> 			}
> 		}
> 	}
> 
> }
> 
> ------------------Testuploader------------------
> 
> public class UploadClientTest {
> 
> 	public static void main(String args[]) throws Exception {
> 	       testVideoUpload();
> 		System.exit(0);
> 
> 	}
> 
>     private static void testVideoUpload() {
> 
>         TestServiceAPI client = createUploadService();
>         String fileName = System.getProperty("user.home")+
> File.separator+"Videos"+File.separator+"videos.zip";
>         System.out.println("File path :" +fileName);
>         DataSource source = new FileDataSource(new File(fileName));
>         client.uploadVideo(new DataHandler(source));
>     }
> 
>     private static TestServiceAPI createUploadService() {
> 
>         System.out.println("File path :" +s);
>         long timeout = 100000L;//60000
> 
>         Map<String,Object> props = new HashMap<String, Object>();
>         props.put("mtom-enabled", Boolean.TRUE);
>         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> 
>         factory.getInInterceptors().add(new LoggingInInterceptor());
>         factory.getOutInterceptors().add(new LoggingOutInterceptor());
>         factory.setServiceClass(UploadService.class);
> 
> factory.setAddress("http://localhost:8080/uplaodTest/api/services/upload");
>         factory.setProperties(props);
>         UploadService client = (UploadService) factory.create();
> 
>         //
>         Client clientCfx = ClientProxy.getClient(client);
>         HTTPConduit conduit = (HTTPConduit) clientCfx.getConduit();
> 
>         HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>         httpClientPolicy.setConnectionTimeout(0);
>         httpClientPolicy.setReceiveTimeout(0);
>         httpClientPolicy.setAllowChunking(true);
>         // ((HTTPConduit)
> factory.getClientFactoryBean().getClient().getConduit()).setClient(httpClie
> ntPolicy); conduit.setClient(httpClientPolicy);
>         return client;
>     }
> 
>   }
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Please check the attach which contains client code ?
http://old.nabble.com/file/p26831941/cxf%2Bhelp.zip cxf+help.zip 

dkulp wrote:
> 
> On Thu December 17 2009 12:27:03 pm surajchhetry wrote:
>> Is StreamingDataHandler is supported by CXF  like
>> Metro(https://jax-ws.dev.java.net/guide/Large_Attachments.html) does?
> 
> CXF just supports streaming directly without any fancy things going on at
> all 
> like requiring a special StreamingDataHandler.
> 
> Dan
> 
> 
>> 
>> surajchhetry wrote:
>> > I don't think we need to increase JVM memory because I have enable MTO
>> > and configured threshold memory limit also as guided by CXF document as
>> > below
>> >
>> >  <jaxws:properties>
>> >                        <entry key="mtom-enabled" value="true" />
>> >                        <entry key="attachment-directory"
>> > value="/home/temp/"/>
>> >                        <entry key="attachment-memory-threshold"
>> > value="4000000"/>
>> >                </jaxws:properties>
>> >
>> > but i have tried that one but nothing change with it's issue
>> >
>> > Me Coder wrote:
>> >> 5GB?  I think you will need a lot of heapspace for the JVM.
>> >>
>> >> --- On Thu, 12/17/09, surajchhetry <su...@gmail.com> wrote:
>> >>> From: surajchhetry <su...@gmail.com>
>> >>> Subject: Re: MTOM OutOfMemory
>> >>> To: users@cxf.apache.org
>> >>> Date: Thursday, December 17, 2009, 3:28 AM
>> >>>
>> >>> Iam using CXF 2.2.5 version and try to upload around 5 GB
>> >>> and got following
>> >>> error.
>> >>> Here is the stack trace
>> >>>
>> >>> Exception in thread "main" java.lang.OutOfMemoryError: Java
>> >>> heap space
>> >>>     at
>> >>> java.util.Arrays.copyOf(Arrays.java:2882)
>> >>>     at
>> >>>
>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.ja
>> >>>va:100) at
>> >>>
>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>> >>>     at
>> >>> java.lang.StringBuilder.append(StringBuilder.java:119)
>> >>>     at
>> >>>
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.ja
>> >>>va:334) at
>> >>>
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.ja
>> >>>va:286) at
>> >>>
>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClos
>> >>>e(LoggingOutInterceptor.java:152) at
>> >>>
>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>> >>>     at
>> >>>
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>> >>>     at
>> >>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>> >>>     at
>> >>>
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEnding
>> >>>Interceptor.handleMessage(MessageSenderInterceptor.java:62) at
>> >>>
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptor
>> >>>Chain.java:236) at
>> >>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>> >>>     at
>> >>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>> >>>     at
>> >>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>> >>>     at
>> >>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>> >>>     at
>> >>>
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>> >>>     at $Proxy57.uploadVideo(Unknown Source)
>> >>>     at
>> >>>
>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebService
>> >>>Tester.java:70) at
>> >>>
>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java
>> >>>:44)
>> >>>
>> >>> dkulp wrote:
>> >>> > This error sounds like a classloader thing. 
>> >>>
>> >>> Check the classpath and such
>> >>>
>> >>> > for
>> >>> > and activation jars.   If you are on
>> >>>
>> >>> Java6, try removing the activation
>> >>>
>> >>> > jar we
>> >>> > ship and such and using the stuff built into the jdk.
>> >>> >
>> >>> > Dan
>> >>> >
>> >>> >
>> >>> > On Sat November 28 2009 3:50:59 pm baeschtu baeschtu
>> >>>
>> >>> wrote:
>> >>> >> I was getting a step forward while using the
>> >>>
>> >>> reference implementation
>> >>>
>> >>> >> large_upload from https://jax-ws.dev.java.net/2.1.7/
>> >>> >> Now I have the following problem. (I'm using
>> >>>
>> >>> maven)
>> >>>
>> >>> >> Nov 28, 2009 9:44:32 PM
>> >>>
>> >>> org.apache.cxf.phase.PhaseInterceptorChain
>> >>>
>> >>> >> doIntercept
>> >>> >> WARNING: Application has thrown exception,
>> >>>
>> >>> unwinding now
>> >>>
>> >>> >> org.apache.cxf.interceptor.Fault: loader
>> >>>
>> >>> constraint violation: loader
>> >>>
>> >>> >> (instance of <bootloader>) previously
>> >>>
>> >>> initiated loading for a different
>> >>>
>> >>> >>  type with name
>> >>>
>> >>> "javax/activation/DataHandler"
>> >>>
>> >>> >>     at
>> >>>
>> >>>
>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvo
>> >>>ker.
>> >>>
>> >>> >> java:148)
>> >>> >>
>> >>> >> Any help would be appreciated!
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>> >>> >>
>> >>> >> > Hi list
>> >>> >> > for a fileupload I need a mtom enabled
>> >>>
>> >>> webservice (wsdl first.) I
>> >>>
>> >>> >> managed
>> >>> >>
>> >>> >> > to write a working wsdl with wsdl2java
>> >>> >> > When I send large binaries ~5GB I got a:
>> >>> >> >
>> >>> >> > WARNING: Interceptor has thrown exception,
>> >>>
>> >>> unwinding now
>> >>>
>> >>> >> > org.apache.cxf.interceptor.Fault:
>> >>>
>> >>> Unmarshalling Error: Java heap space
>> >>>
>> >>> >> > When I check with wireshark, for small files
>> >>>
>> >>> it looks like SwA seams to
>> >>>
>> >>> >> > work:
>> >>> >> > MIME Multipart Media Encapsulation, Type:
>> >>>
>> >>> multipart/related, Boundary:
>> >>> >> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>> >>> >> >
>> >>> >> > When trying to upload large files I see only
>> >>>
>> >>> "Continuation or non-HTTP
>> >>>
>> >>> >> > traffic" and then follows the OutOfMemory
>> >>>
>> >>> exception.
>> >>>
>> >>> >> > 35506    5625.427090   
>> >>>
>> >>> 127.0.0.1    127.0.0.1    HTTP 
>> >>>   Continuation
>> >>>
>> >>> >> or
>> >>> >>
>> >>> >> > non-HTTP traffic.
>> >>> >> >
>> >>> >> > I also have the
>> >>>
>> >>> xmime:expectedContentTypes="application/octet-stream"
>> >>>
>> >>> >> in
>> >>> >>
>> >>> >> > and DataHandlers are generated.
>> >>> >> > Has someone a working example, or some
>> >>>
>> >>> hints?
>> >>>
>> >>> >> > Thanks
>> >>> >> > Bast
>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26831941.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
This is my code ....

@Path("/services/upload")
@WebService(serviceName = "upload", name = "UploadWebService",
targetNamespace = "http://ws.surajchh.com")
public interface TestServiceAPI {
	
	@Consumes("multipart/form-data")
	@WebMethod(operationName = "video")
	@POST
	@Path("/video")
	@WebResult(name = "UploadedUrl")
	
	public String uploadVideo(@WebParam(name = "data") @PathParam("data")
@XmlMimeType("application/octet-stream")DataHandler data)	throws
ServiceException;
}


----------------------------

public class TestServiceAPIImpl implements TestServiceAPI {

	private final Log logger = LogFactory.getLog(this.getClass());

	@Autowired
	@Qualifier("wsMessageSource")
	private MessageSource messageSource;

	private String videoPath;
	
	@Override
	public String uploadVideo(DataHandler data) throws ServiceException {
		try {
			this.videoPath = messageSource.getMessage("video.rootDirectory", null,
null,null);
			this.logger.info("vpath = "+this.videoPath);
			if(videoPath== null)
				throw new ServiceException("Configuration error");
			this.logger.info("Validate.....");
			this.logger.info("Uploading video......");
			this.logger.info("VideoRootPath ="+videoPath);
			this.logger.info("Uploading video......contanint found");
			//InputStream inputStream = dataHandler.getInputStream();
			this.logger.info("Uploading video......inserting video info");
			String url = this.videoService.createVideo(videoInfo);
			this.logger.info("Uploading video......processing upload");
			String uploadPath = this.processUpload(data);
			return uploadPath;
		} catch (Exception e) {
			throw new ServiceException(e.getMessage());
		}
	}

	private String processUpload(DataHandler dataHandler) throws Exception {
		int videoId = 22;		
		String videoPath = this.videoPath+ File.separator + videoId;
		File f = new File(videoPath);
		final String uploadPath = f.getPath() + File.separator + videoId + "."+
avi;
		File tempFile = File.createTempFile("upload" + videoId, fileType);
		OutputStream outputStream = new FileOutputStream(tempFile);// new//
File(uploadPath)
		synchronized (dataHandler) {
			synchronized (outputStream) {
				byte[] b = new byte[2048];
				while (true) {
					int byteRead = dataHandler.getInputStream().read(b);
					if (byteRead == -1)
						break;
					outputStream.write(b, 0, byteRead);
				}
				outputStream.flush();
				outputStream.close();
				File serverFile = new File(uploadPath);
				tempFile.renameTo(serverFile);
				logger.debug("Uploading Done...");
				return uploadPath;
			}
		}
	}

}

------------------Testuploader------------------

public class UploadClientTest {
	
	public static void main(String args[]) throws Exception {
	       testVideoUpload();
		System.exit(0);

	}

    private static void testVideoUpload() {

        TestServiceAPI client = createUploadService();
        String fileName = System.getProperty("user.home")+
File.separator+"Videos"+File.separator+"videos.zip";
        System.out.println("File path :" +fileName);
        DataSource source = new FileDataSource(new File(fileName));
        client.uploadVideo(new DataHandler(source));
    }

    private static TestServiceAPI createUploadService() {

        System.out.println("File path :" +s);
        long timeout = 100000L;//60000

        Map<String,Object> props = new HashMap<String, Object>();
        props.put("mtom-enabled", Boolean.TRUE);
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

        factory.getInInterceptors().add(new LoggingInInterceptor());
        factory.getOutInterceptors().add(new LoggingOutInterceptor());
        factory.setServiceClass(UploadService.class);
       
factory.setAddress("http://localhost:8080/uplaodTest/api/services/upload");
        factory.setProperties(props);
        UploadService client = (UploadService) factory.create();

        //
        Client clientCfx = ClientProxy.getClient(client);
        HTTPConduit conduit = (HTTPConduit) clientCfx.getConduit();

        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
        httpClientPolicy.setConnectionTimeout(0);
        httpClientPolicy.setReceiveTimeout(0);
        httpClientPolicy.setAllowChunking(true);
        // ((HTTPConduit)
factory.getClientFactoryBean().getClient().getConduit()).setClient(httpClientPolicy);
        conduit.setClient(httpClientPolicy);
        return client;
    }
                                                           
  }


-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26832040.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
On Thu December 17 2009 12:27:03 pm surajchhetry wrote:
> Is StreamingDataHandler is supported by CXF  like
> Metro(https://jax-ws.dev.java.net/guide/Large_Attachments.html) does?

CXF just supports streaming directly without any fancy things going on at all 
like requiring a special StreamingDataHandler.

Dan


> 
> surajchhetry wrote:
> > I don't think we need to increase JVM memory because I have enable MTO
> > and configured threshold memory limit also as guided by CXF document as
> > below
> >
> >  <jaxws:properties>
> >                        <entry key="mtom-enabled" value="true" />
> >                        <entry key="attachment-directory"
> > value="/home/temp/"/>
> >                        <entry key="attachment-memory-threshold"
> > value="4000000"/>
> >                </jaxws:properties>
> >
> > but i have tried that one but nothing change with it's issue
> >
> > Me Coder wrote:
> >> 5GB?  I think you will need a lot of heapspace for the JVM.
> >>
> >> --- On Thu, 12/17/09, surajchhetry <su...@gmail.com> wrote:
> >>> From: surajchhetry <su...@gmail.com>
> >>> Subject: Re: MTOM OutOfMemory
> >>> To: users@cxf.apache.org
> >>> Date: Thursday, December 17, 2009, 3:28 AM
> >>>
> >>> Iam using CXF 2.2.5 version and try to upload around 5 GB
> >>> and got following
> >>> error.
> >>> Here is the stack trace
> >>>
> >>> Exception in thread "main" java.lang.OutOfMemoryError: Java
> >>> heap space
> >>>     at
> >>> java.util.Arrays.copyOf(Arrays.java:2882)
> >>>     at
> >>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.ja
> >>>va:100) at
> >>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
> >>>     at
> >>> java.lang.StringBuilder.append(StringBuilder.java:119)
> >>>     at
> >>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.ja
> >>>va:334) at
> >>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.ja
> >>>va:286) at
> >>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClos
> >>>e(LoggingOutInterceptor.java:152) at
> >>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
> >>>     at
> >>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >>>     at
> >>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
> >>>     at
> >>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEnding
> >>>Interceptor.handleMessage(MessageSenderInterceptor.java:62) at
> >>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptor
> >>>Chain.java:236) at
> >>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
> >>>     at
> >>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
> >>>     at
> >>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
> >>>     at
> >>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >>>     at
> >>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> >>>     at $Proxy57.uploadVideo(Unknown Source)
> >>>     at
> >>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebService
> >>>Tester.java:70) at
> >>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java
> >>>:44)
> >>>
> >>> dkulp wrote:
> >>> > This error sounds like a classloader thing. 
> >>>
> >>> Check the classpath and such
> >>>
> >>> > for
> >>> > and activation jars.   If you are on
> >>>
> >>> Java6, try removing the activation
> >>>
> >>> > jar we
> >>> > ship and such and using the stuff built into the jdk.
> >>> >
> >>> > Dan
> >>> >
> >>> >
> >>> > On Sat November 28 2009 3:50:59 pm baeschtu baeschtu
> >>>
> >>> wrote:
> >>> >> I was getting a step forward while using the
> >>>
> >>> reference implementation
> >>>
> >>> >> large_upload from https://jax-ws.dev.java.net/2.1.7/
> >>> >> Now I have the following problem. (I'm using
> >>>
> >>> maven)
> >>>
> >>> >> Nov 28, 2009 9:44:32 PM
> >>>
> >>> org.apache.cxf.phase.PhaseInterceptorChain
> >>>
> >>> >> doIntercept
> >>> >> WARNING: Application has thrown exception,
> >>>
> >>> unwinding now
> >>>
> >>> >> org.apache.cxf.interceptor.Fault: loader
> >>>
> >>> constraint violation: loader
> >>>
> >>> >> (instance of <bootloader>) previously
> >>>
> >>> initiated loading for a different
> >>>
> >>> >>  type with name
> >>>
> >>> "javax/activation/DataHandler"
> >>>
> >>> >>     at
> >>>
> >>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvo
> >>>ker.
> >>>
> >>> >> java:148)
> >>> >>
> >>> >> Any help would be appreciated!
> >>> >>
> >>> >>
> >>> >>
> >>> >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
> >>> >>
> >>> >> > Hi list
> >>> >> > for a fileupload I need a mtom enabled
> >>>
> >>> webservice (wsdl first.) I
> >>>
> >>> >> managed
> >>> >>
> >>> >> > to write a working wsdl with wsdl2java
> >>> >> > When I send large binaries ~5GB I got a:
> >>> >> >
> >>> >> > WARNING: Interceptor has thrown exception,
> >>>
> >>> unwinding now
> >>>
> >>> >> > org.apache.cxf.interceptor.Fault:
> >>>
> >>> Unmarshalling Error: Java heap space
> >>>
> >>> >> > When I check with wireshark, for small files
> >>>
> >>> it looks like SwA seams to
> >>>
> >>> >> > work:
> >>> >> > MIME Multipart Media Encapsulation, Type:
> >>>
> >>> multipart/related, Boundary:
> >>> >> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
> >>> >> >
> >>> >> > When trying to upload large files I see only
> >>>
> >>> "Continuation or non-HTTP
> >>>
> >>> >> > traffic" and then follows the OutOfMemory
> >>>
> >>> exception.
> >>>
> >>> >> > 35506    5625.427090   
> >>>
> >>> 127.0.0.1    127.0.0.1    HTTP 
> >>>   Continuation
> >>>
> >>> >> or
> >>> >>
> >>> >> > non-HTTP traffic.
> >>> >> >
> >>> >> > I also have the
> >>>
> >>> xmime:expectedContentTypes="application/octet-stream"
> >>>
> >>> >> in
> >>> >>
> >>> >> > and DataHandlers are generated.
> >>> >> > Has someone a working example, or some
> >>>
> >>> hints?
> >>>
> >>> >> > Thanks
> >>> >> > Bast
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Is StreamingDataHandler is supported by CXF  like
Metro(https://jax-ws.dev.java.net/guide/Large_Attachments.html) does? 

surajchhetry wrote:
> 
> I don't think we need to increase JVM memory because I have enable MTO and
> configured threshold memory limit also as guided by CXF document as below
> :
>  <jaxws:properties>
>                        <entry key="mtom-enabled" value="true" />
>                        <entry key="attachment-directory"
> value="/home/temp/"/>
>                        <entry key="attachment-memory-threshold"
> value="4000000"/>
>                </jaxws:properties>
> 
> but i have tried that one but nothing change with it's issue 
> 
> Me Coder wrote:
>> 
>> 5GB?  I think you will need a lot of heapspace for the JVM.
>> 
>> 
>> --- On Thu, 12/17/09, surajchhetry <su...@gmail.com> wrote:
>> 
>>> From: surajchhetry <su...@gmail.com>
>>> Subject: Re: MTOM OutOfMemory
>>> To: users@cxf.apache.org
>>> Date: Thursday, December 17, 2009, 3:28 AM
>>> 
>>> Iam using CXF 2.2.5 version and try to upload around 5 GB
>>> and got following
>>> error.
>>> Here is the stack trace 
>>> 
>>> Exception in thread "main" java.lang.OutOfMemoryError: Java
>>> heap space
>>>     at
>>> java.util.Arrays.copyOf(Arrays.java:2882)
>>>     at
>>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>>     at
>>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>>     at
>>> java.lang.StringBuilder.append(StringBuilder.java:119)
>>>     at
>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>>     at
>>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>>     at
>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>>     at
>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>>     at
>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>     at
>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>>     at
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>     at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>     at
>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>>     at
>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>>     at
>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>>     at
>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>     at
>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>>     at $Proxy57.uploadVideo(Unknown Source)
>>>     at
>>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>>     at
>>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>>> 
>>> 
>>> dkulp wrote:
>>> > 
>>> > 
>>> > This error sounds like a classloader thing. 
>>> Check the classpath and such
>>> > for 
>>> > and activation jars.   If you are on
>>> Java6, try removing the activation
>>> > jar we 
>>> > ship and such and using the stuff built into the jdk.
>>> > 
>>> > Dan
>>> > 
>>> > 
>>> > On Sat November 28 2009 3:50:59 pm baeschtu baeschtu
>>> wrote:
>>> >> I was getting a step forward while using the
>>> reference implementation
>>> >> large_upload from https://jax-ws.dev.java.net/2.1.7/
>>> >> Now I have the following problem. (I'm using
>>> maven)
>>> >> 
>>> >> Nov 28, 2009 9:44:32 PM
>>> org.apache.cxf.phase.PhaseInterceptorChain
>>> >> doIntercept
>>> >> WARNING: Application has thrown exception,
>>> unwinding now
>>> >> org.apache.cxf.interceptor.Fault: loader
>>> constraint violation: loader
>>> >> (instance of <bootloader>) previously
>>> initiated loading for a different
>>> >>  type with name
>>> "javax/activation/DataHandler"
>>> >>     at
>>> >>
>>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>>> >> java:148)
>>> >> 
>>> >> Any help would be appreciated!
>>> >> 
>>> >> 
>>> >> 
>>> >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>>> >> 
>>> >> > Hi list
>>> >> > for a fileupload I need a mtom enabled
>>> webservice (wsdl first.) I
>>> >> managed
>>> >> > to write a working wsdl with wsdl2java
>>> >> > When I send large binaries ~5GB I got a:
>>> >> >
>>> >> > WARNING: Interceptor has thrown exception,
>>> unwinding now
>>> >> > org.apache.cxf.interceptor.Fault:
>>> Unmarshalling Error: Java heap space
>>> >> >
>>> >> > When I check with wireshark, for small files
>>> it looks like SwA seams to
>>> >> > work:
>>> >> > MIME Multipart Media Encapsulation, Type:
>>> multipart/related, Boundary:
>>> >> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>>> >> >
>>> >> > When trying to upload large files I see only
>>> "Continuation or non-HTTP
>>> >> > traffic" and then follows the OutOfMemory
>>> exception.
>>> >> > 35506    5625.427090   
>>> 127.0.0.1    127.0.0.1    HTTP 
>>>   Continuation
>>> >> or
>>> >> > non-HTTP traffic.
>>> >> >
>>> >> > I also have the
>>> xmime:expectedContentTypes="application/octet-stream"
>>> >> in
>>> >> > and DataHandlers are generated.
>>> >> > Has someone a working example, or some
>>> hints?
>>> >> >
>>> >> > Thanks
>>> >> > Bast
>>> >> 
>>> > 
>>> > -- 
>>> > Daniel Kulp
>>> > dkulp@apache.org
>>> > http://www.dankulp.com/blog
>>> > 
>>> > 
>>> 
>>> -- 
>>> View this message in context:
>>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>> 
>>> 
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26831735.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Coder One <co...@yahoo.com>.
Another stab in the dark, trying to help :), maybe lower the threshold substantially and see what happens?

--- On Thu, 12/17/09, surajchhetry <su...@gmail.com> wrote:

> From: surajchhetry <su...@gmail.com>
> Subject: Re: MTOM OutOfMemory
> To: users@cxf.apache.org
> Date: Thursday, December 17, 2009, 9:19 AM
> 
> I don't think so I have enable MTO and configured to write
> in temp file if
> the size is greater than Memory limit provided by CXF
> documentation 
>  <jaxws:properties>
>                
>        <entry key="mtom-enabled"
> value="true" />
>                
>        <entry
> key="attachment-directory"
> value="/home/temp/"/>
>                
>        <entry
> key="attachment-memory-threshold"
> value="4000000"/>
>            
>    </jaxws:properties>
> 
> but i have tried that one but nothing change with it's
> issue 
> 
> Me Coder wrote:
> > 
> > 5GB?  I think you will need a lot of heapspace
> for the JVM.
> > 
> > 
> > --- On Thu, 12/17/09, surajchhetry <su...@gmail.com>
> wrote:
> > 
> >> From: surajchhetry <su...@gmail.com>
> >> Subject: Re: MTOM OutOfMemory
> >> To: users@cxf.apache.org
> >> Date: Thursday, December 17, 2009, 3:28 AM
> >> 
> >> Iam using CXF 2.2.5 version and try to upload
> around 5 GB
> >> and got following
> >> error.
> >> Here is the stack trace 
> >> 
> >> Exception in thread "main"
> java.lang.OutOfMemoryError: Java
> >> heap space
> >>     at
> >> java.util.Arrays.copyOf(Arrays.java:2882)
> >>     at
> >>
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
> >>     at
> >>
> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
> >>     at
> >>
> java.lang.StringBuilder.append(StringBuilder.java:119)
> >>     at
> >>
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
> >>     at
> >>
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
> >>     at
> >>
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
> >>     at
> >>
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
> >>     at
> >>
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >>     at
> >>
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
> >>     at
> >>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> >>     at
> >>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> >>     at
> >>
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
> >>     at
> >>
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
> >>     at
> >>
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
> >>     at
> >>
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >>     at
> >>
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> >>     at $Proxy57.uploadVideo(Unknown Source)
> >>     at
> >>
> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
> >>     at
> >>
> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
> >> 
> >> 
> >> dkulp wrote:
> >> > 
> >> > 
> >> > This error sounds like a classloader
> thing. 
> >> Check the classpath and such
> >> > for 
> >> > and activation jars.   If you are on
> >> Java6, try removing the activation
> >> > jar we 
> >> > ship and such and using the stuff built into
> the jdk.
> >> > 
> >> > Dan
> >> > 
> >> > 
> >> > On Sat November 28 2009 3:50:59 pm baeschtu
> baeschtu
> >> wrote:
> >> >> I was getting a step forward while using
> the
> >> reference implementation
> >> >> large_upload from https://jax-ws.dev.java.net/2.1.7/
> >> >> Now I have the following problem. (I'm
> using
> >> maven)
> >> >> 
> >> >> Nov 28, 2009 9:44:32 PM
> >> org.apache.cxf.phase.PhaseInterceptorChain
> >> >> doIntercept
> >> >> WARNING: Application has thrown
> exception,
> >> unwinding now
> >> >> org.apache.cxf.interceptor.Fault: loader
> >> constraint violation: loader
> >> >> (instance of <bootloader>)
> previously
> >> initiated loading for a different
> >> >>  type with name
> >> "javax/activation/DataHandler"
> >> >>     at
> >> >>
> >>
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
> >> >> java:148)
> >> >> 
> >> >> Any help would be appreciated!
> >> >> 
> >> >> 
> >> >> 
> >> >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
> >> >> 
> >> >> > Hi list
> >> >> > for a fileupload I need a mtom
> enabled
> >> webservice (wsdl first.) I
> >> >> managed
> >> >> > to write a working wsdl with
> wsdl2java
> >> >> > When I send large binaries ~5GB I
> got a:
> >> >> >
> >> >> > WARNING: Interceptor has thrown
> exception,
> >> unwinding now
> >> >> > org.apache.cxf.interceptor.Fault:
> >> Unmarshalling Error: Java heap space
> >> >> >
> >> >> > When I check with wireshark, for
> small files
> >> it looks like SwA seams to
> >> >> > work:
> >> >> > MIME Multipart Media Encapsulation,
> Type:
> >> multipart/related, Boundary:
> >> >> >
> "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
> >> >> >
> >> >> > When trying to upload large files I
> see only
> >> "Continuation or non-HTTP
> >> >> > traffic" and then follows the
> OutOfMemory
> >> exception.
> >> >> > 35506    5625.427090   
> >> 127.0.0.1    127.0.0.1    HTTP 
> >>   Continuation
> >> >> or
> >> >> > non-HTTP traffic.
> >> >> >
> >> >> > I also have the
> >>
> xmime:expectedContentTypes="application/octet-stream"
> >> >> in
> >> >> > and DataHandlers are generated.
> >> >> > Has someone a working example, or
> some
> >> hints?
> >> >> >
> >> >> > Thanks
> >> >> > Bast
> >> >> 
> >> > 
> >> > -- 
> >> > Daniel Kulp
> >> > dkulp@apache.org
> >> > http://www.dankulp.com/blog
> >> > 
> >> > 
> >> 
> >> -- 
> >> View this message in context:
> >> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
> >> Sent from the cxf-user mailing list archive at
> Nabble.com.
> >> 
> >> 
> > 
> > 
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26831636.html
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 


      

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
I don't think so I have enable MTO and configured to write in temp file if
the size is greater than Memory limit provided by CXF documentation 
 <jaxws:properties>
                       <entry key="mtom-enabled" value="true" />
                       <entry key="attachment-directory"
value="/home/temp/"/>
                       <entry key="attachment-memory-threshold"
value="4000000"/>
               </jaxws:properties>

but i have tried that one but nothing change with it's issue 

Me Coder wrote:
> 
> 5GB?  I think you will need a lot of heapspace for the JVM.
> 
> 
> --- On Thu, 12/17/09, surajchhetry <su...@gmail.com> wrote:
> 
>> From: surajchhetry <su...@gmail.com>
>> Subject: Re: MTOM OutOfMemory
>> To: users@cxf.apache.org
>> Date: Thursday, December 17, 2009, 3:28 AM
>> 
>> Iam using CXF 2.2.5 version and try to upload around 5 GB
>> and got following
>> error.
>> Here is the stack trace 
>> 
>> Exception in thread "main" java.lang.OutOfMemoryError: Java
>> heap space
>>     at
>> java.util.Arrays.copyOf(Arrays.java:2882)
>>     at
>> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>>     at
>> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>>     at
>> java.lang.StringBuilder.append(StringBuilder.java:119)
>>     at
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>>     at
>> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>>     at
>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>>     at
>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>>     at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>>     at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>     at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>     at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>>     at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>>     at
>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>>     at
>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>     at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>     at $Proxy57.uploadVideo(Unknown Source)
>>     at
>> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>>     at
>> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
>> 
>> 
>> dkulp wrote:
>> > 
>> > 
>> > This error sounds like a classloader thing. 
>> Check the classpath and such
>> > for 
>> > and activation jars.   If you are on
>> Java6, try removing the activation
>> > jar we 
>> > ship and such and using the stuff built into the jdk.
>> > 
>> > Dan
>> > 
>> > 
>> > On Sat November 28 2009 3:50:59 pm baeschtu baeschtu
>> wrote:
>> >> I was getting a step forward while using the
>> reference implementation
>> >> large_upload from https://jax-ws.dev.java.net/2.1.7/
>> >> Now I have the following problem. (I'm using
>> maven)
>> >> 
>> >> Nov 28, 2009 9:44:32 PM
>> org.apache.cxf.phase.PhaseInterceptorChain
>> >> doIntercept
>> >> WARNING: Application has thrown exception,
>> unwinding now
>> >> org.apache.cxf.interceptor.Fault: loader
>> constraint violation: loader
>> >> (instance of <bootloader>) previously
>> initiated loading for a different
>> >>  type with name
>> "javax/activation/DataHandler"
>> >>     at
>> >>
>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>> >> java:148)
>> >> 
>> >> Any help would be appreciated!
>> >> 
>> >> 
>> >> 
>> >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>> >> 
>> >> > Hi list
>> >> > for a fileupload I need a mtom enabled
>> webservice (wsdl first.) I
>> >> managed
>> >> > to write a working wsdl with wsdl2java
>> >> > When I send large binaries ~5GB I got a:
>> >> >
>> >> > WARNING: Interceptor has thrown exception,
>> unwinding now
>> >> > org.apache.cxf.interceptor.Fault:
>> Unmarshalling Error: Java heap space
>> >> >
>> >> > When I check with wireshark, for small files
>> it looks like SwA seams to
>> >> > work:
>> >> > MIME Multipart Media Encapsulation, Type:
>> multipart/related, Boundary:
>> >> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>> >> >
>> >> > When trying to upload large files I see only
>> "Continuation or non-HTTP
>> >> > traffic" and then follows the OutOfMemory
>> exception.
>> >> > 35506    5625.427090   
>> 127.0.0.1    127.0.0.1    HTTP 
>>   Continuation
>> >> or
>> >> > non-HTTP traffic.
>> >> >
>> >> > I also have the
>> xmime:expectedContentTypes="application/octet-stream"
>> >> in
>> >> > and DataHandlers are generated.
>> >> > Has someone a working example, or some
>> hints?
>> >> >
>> >> > Thanks
>> >> > Bast
>> >> 
>> > 
>> > -- 
>> > Daniel Kulp
>> > dkulp@apache.org
>> > http://www.dankulp.com/blog
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>> 
>> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26831636.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
On Thu December 17 2009 12:07:48 pm Coder One wrote:
> 5GB?  I think you will need a lot of heapspace for the JVM.

No, if it's an MTOM attachment, it should just stream in fine.

Dan


> 
> --- On Thu, 12/17/09, surajchhetry <su...@gmail.com> wrote:
> > From: surajchhetry <su...@gmail.com>
> > Subject: Re: MTOM OutOfMemory
> > To: users@cxf.apache.org
> > Date: Thursday, December 17, 2009, 3:28 AM
> >
> > Iam using CXF 2.2.5 version and try to upload around 5 GB
> > and got following
> > error.
> > Here is the stack trace
> >
> > Exception in thread "main" java.lang.OutOfMemoryError: Java
> > heap space
> >     at
> > java.util.Arrays.copyOf(Arrays.java:2882)
> >     at
> > java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java
> >:100) at
> > java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
> >     at
> > java.lang.StringBuilder.append(StringBuilder.java:119)
> >     at
> > org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java
> >:334) at
> > org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java
> >:286) at
> > org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(
> >LoggingOutInterceptor.java:152) at
> > org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
> >     at
> > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >     at
> > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
> >     at
> > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingIn
> >terceptor.handleMessage(MessageSenderInterceptor.java:62) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> >ain.java:236) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
> >     at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
> >     at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
> >     at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >     at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> >     at $Proxy57.uploadVideo(Unknown Source)
> >     at
> > com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTe
> >ster.java:70) at
> > com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:4
> >4)
> >
> > dkulp wrote:
> > > This error sounds like a classloader thing. 
> >
> > Check the classpath and such
> >
> > > for
> > > and activation jars.   If you are on
> >
> > Java6, try removing the activation
> >
> > > jar we
> > > ship and such and using the stuff built into the jdk.
> > >
> > > Dan
> > >
> > >
> > > On Sat November 28 2009 3:50:59 pm baeschtu baeschtu
> >
> > wrote:
> > >> I was getting a step forward while using the
> >
> > reference implementation
> >
> > >> large_upload from https://jax-ws.dev.java.net/2.1.7/
> > >> Now I have the following problem. (I'm using
> >
> > maven)
> >
> > >> Nov 28, 2009 9:44:32 PM
> >
> > org.apache.cxf.phase.PhaseInterceptorChain
> >
> > >> doIntercept
> > >> WARNING: Application has thrown exception,
> >
> > unwinding now
> >
> > >> org.apache.cxf.interceptor.Fault: loader
> >
> > constraint violation: loader
> >
> > >> (instance of <bootloader>) previously
> >
> > initiated loading for a different
> >
> > >>  type with name
> >
> > "javax/activation/DataHandler"
> >
> > >>     at
> >
> > org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoke
> >r.
> >
> > >> java:148)
> > >>
> > >> Any help would be appreciated!
> > >>
> > >>
> > >>
> > >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
> > >>
> > >> > Hi list
> > >> > for a fileupload I need a mtom enabled
> >
> > webservice (wsdl first.) I
> >
> > >> managed
> > >>
> > >> > to write a working wsdl with wsdl2java
> > >> > When I send large binaries ~5GB I got a:
> > >> >
> > >> > WARNING: Interceptor has thrown exception,
> >
> > unwinding now
> >
> > >> > org.apache.cxf.interceptor.Fault:
> >
> > Unmarshalling Error: Java heap space
> >
> > >> > When I check with wireshark, for small files
> >
> > it looks like SwA seams to
> >
> > >> > work:
> > >> > MIME Multipart Media Encapsulation, Type:
> >
> > multipart/related, Boundary:
> > >> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
> > >> >
> > >> > When trying to upload large files I see only
> >
> > "Continuation or non-HTTP
> >
> > >> > traffic" and then follows the OutOfMemory
> >
> > exception.
> >
> > >> > 35506    5625.427090   
> >
> > 127.0.0.1    127.0.0.1    HTTP 
> >   Continuation
> >
> > >> or
> > >>
> > >> > non-HTTP traffic.
> > >> >
> > >> > I also have the
> >
> > xmime:expectedContentTypes="application/octet-stream"
> >
> > >> in
> > >>
> > >> > and DataHandlers are generated.
> > >> > Has someone a working example, or some
> >
> > hints?
> >
> > >> > Thanks
> > >> > Bast
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
On Jan 13, 2014, at 6:39 AM, yogesh_d1@yahoo.com wrote:

> Dan,
> You're right, it was the byte array that was becoming too big. 
> After I commented out the first send to server and the MTOM client code
> seems to send file, 
> as you said , now the OOM error has moved to server .
> 
> 
> However - I am still splitting my hair to see what wrongdoing I did in my
> applications client which still continues to give me OOM error due to heap
> space
> 
> Below isclient side stack trace from my client ( that uses https transport
> and a some more complex data structures) ... let me know if you notice
> anything untoward here 
> 
> Please note that this happens after I call the service method on my port
> object that uploads large object  "port.uploadObject(objReqParam);
> 
> 
> 
> Opened file:src/main/InfantHealthcare.jpg for read...( this is a BIG file) 
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>        at java.util.Arrays.copyOf(Arrays.java:2271)
>        at
> java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:178)
>        at
> org.apache.cxf.helpers.IOUtils.readBytesFromStream(IOUtils.java:235)
>        at
> org.apache.cxf.io.CachedOutputStream.getBytes(CachedOutputStream.java:264)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRetransmits(HTTPConduit.java:2015)


Looking in there:

if (LOG.isLoggable(Level.FINE) && cachedStream != null) {
                    LOG.fine("Conduit \""
                             + getConduitName() 
                             + "\" Transmit cached message to: " 
                             + url
                             + ": "
                             + new String(cachedStream.getBytes()));
                }


You wouldn’t by any chance of FINE logging turned on?  

It looks like you have auto redirects turned on or similar so that the entire request is cached PLUS you have FINE logging turned on.  Looks like the combination of the two is causing an issue.   Can you verify and log an issue?


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: MTOM OutOfMemory

Posted by "yogesh_d1@yahoo.com" <yo...@yahoo.com>.
Dan,
You're right, it was the byte array that was becoming too big. 
After I commented out the first send to server and the MTOM client code
seems to send file, 
as you said , now the OOM error has moved to server .


However - I am still splitting my hair to see what wrongdoing I did in my
applications client which still continues to give me OOM error due to heap
space
 
Below isclient side stack trace from my client ( that uses https transport
and a some more complex data structures) ... let me know if you notice
anything untoward here 

Please note that this happens after I call the service method on my port
object that uploads large object  "port.uploadObject(objReqParam);



Opened file:src/main/InfantHealthcare.jpg for read...( this is a BIG file) 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2271)
        at
java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:178)
        at
org.apache.cxf.helpers.IOUtils.readBytesFromStream(IOUtils.java:235)
        at
org.apache.cxf.io.CachedOutputStream.getBytes(CachedOutputStream.java:264)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRetransmits(HTTPConduit.java:2015)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2066)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1925)
        at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
        at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662)
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:247)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
        at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
        at $Proxy36.uploadObject(Unknown Source)
        at
com.dell.dcca.webservice.objectstore.client.Client.main(Client.java:127)
 







--
View this message in context: http://cxf.547215.n5.nabble.com/MTOM-OutOfMemory-tp547525p5738495.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
On Jan 10, 2014, at 2:14 AM, Yogesh Devi <yo...@yahoo.com> wrote:

> Dan,
> Thanks for your reponse 
> 
> I am able to reproduce the same issue with the mtom sample that ships with CXF 
> 
> More specifically 
> 
> I used apache-cxf-2.7.7   samples/mtom
> 
> 
> All I did is , replace the "me.bmp" with a 1.23 GB file  and I get exactly same client side exception that I get in my code 

You would also need to update the Client.java to NOT do the first call to the server.   The first call loads the bmp into a byte[] and calls the port.testByteArray to show how that would get mapped into MTOM.   With a 1.3GB file, loading that into the byte[] likely is failing. 

If I do:
 dd if=/dev/zero of=src/main/resources/me.bmp bs=4096 count=204800

to create a 800MB file and comment out the code around first call to the service,  the client does transfer the file fine.   It OOM’s on the server as the server loads the attachment into a ByteArrayOutputStream, but all the data does get there.


Dan


> 
>  reproduced below from "mvn -Pclient" run of "samples/mtom"
> 
> -------------------------------------
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (def
> ault) on project mtom: An exception occured while executing the Java class. null
> : InvocationTargetException: Java heap space -> [Help 1]
> ----------------------------------------------------------
> 
> Note - ( I ack. that happen to use 2.7.7 which is a tad older , however I checked release
> notes for 2.7.8 and 3.X milestone release and found no reference to 
> MTOM fixes so for now I am still sticking to 2.7.7) 
> 
> 
> Best regards 
> 
> 
> Yogesh 
> 
> 
> 
> ________________________________
> From: Daniel Kulp <dk...@apache.org>
> To: users@cxf.apache.org; yogesh_d1@yahoo.com 
> Sent: Thursday, January 9, 2014 9:28 PM
> Subject: Re: MTOM OutOfMemory
> 
> 
> 
> On Jan 9, 2014, at 1:11 AM, yogesh_d1@yahoo.com wrote:
> 
>> List -I am facing a similar problem and have made a post for this. Looking at
>> this I would like to know if any of the users here were able to establish
>> working MTOM with large attachments. I would hugely appreciate a working
>> sample  
> 
> You could try modifying the mtom sample in the CXF kits to use a larger attachment.   The samples is fairly small since it’s going in the kit, but feel free to play with it and see if you can reproduce your issue.
> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: MTOM OutOfMemory

Posted by Yogesh Devi <yo...@yahoo.com>.
Dan,
Thanks for your reponse 

I am able to reproduce the same issue with the mtom sample that ships with CXF 

More specifically 

I used apache-cxf-2.7.7   samples/mtom


All I did is , replace the "me.bmp" with a 1.23 GB file  and I get exactly same client side exception that I get in my code 

 reproduced below from "mvn -Pclient" run of "samples/mtom"

-------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (def
ault) on project mtom: An exception occured while executing the Java class. null
: InvocationTargetException: Java heap space -> [Help 1]
----------------------------------------------------------

Note - ( I ack. that happen to use 2.7.7 which is a tad older , however I checked release
 notes for 2.7.8 and 3.X milestone release and found no reference to 
MTOM fixes so for now I am still sticking to 2.7.7) 


Best regards 


Yogesh 



________________________________
 From: Daniel Kulp <dk...@apache.org>
To: users@cxf.apache.org; yogesh_d1@yahoo.com 
Sent: Thursday, January 9, 2014 9:28 PM
Subject: Re: MTOM OutOfMemory
 


On Jan 9, 2014, at 1:11 AM, yogesh_d1@yahoo.com wrote:

> List -I am facing a similar problem and have made a post for this. Looking at
> this I would like to know if any of the users here were able to establish
> working MTOM with large attachments. I would hugely appreciate a working
> sample  

You could try modifying the mtom sample in the CXF kits to use a larger attachment.   The samples is fairly small since it’s going in the kit, but feel free to play with it and see if you can reproduce your issue.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
On Jan 9, 2014, at 1:11 AM, yogesh_d1@yahoo.com wrote:

> List -I am facing a similar problem and have made a post for this. Looking at
> this I would like to know if any of the users here were able to establish
> working MTOM with large attachments. I would hugely appreciate a working
> sample  

You could try modifying the mtom sample in the CXF kits to use a larger attachment.   The samples is fairly small since it’s going in the kit, but feel free to play with it and see if you can reproduce your issue.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: MTOM OutOfMemory

Posted by "yogesh_d1@yahoo.com" <yo...@yahoo.com>.
List -I am facing a similar problem and have made a post for this. Looking at
this I would like to know if any of the users here were able to establish
working MTOM with large attachments. I would hugely appreciate a working
sample  



--
View this message in context: http://cxf.547215.n5.nabble.com/MTOM-OutOfMemory-tp547525p5738407.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: MTOM OutOfMemory

Posted by Coder One <co...@yahoo.com>.
5GB?  I think you will need a lot of heapspace for the JVM.


--- On Thu, 12/17/09, surajchhetry <su...@gmail.com> wrote:

> From: surajchhetry <su...@gmail.com>
> Subject: Re: MTOM OutOfMemory
> To: users@cxf.apache.org
> Date: Thursday, December 17, 2009, 3:28 AM
> 
> Iam using CXF 2.2.5 version and try to upload around 5 GB
> and got following
> error.
> Here is the stack trace 
> 
> Exception in thread "main" java.lang.OutOfMemoryError: Java
> heap space
>     at
> java.util.Arrays.copyOf(Arrays.java:2882)
>     at
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>     at
> java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
>     at
> java.lang.StringBuilder.append(StringBuilder.java:119)
>     at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
>     at
> org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
>     at
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
>     at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
>     at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>     at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
>     at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>     at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>     at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
>     at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
>     at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
>     at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>     at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>     at $Proxy57.uploadVideo(Unknown Source)
>     at
> com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
>     at
> com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)
> 
> 
> dkulp wrote:
> > 
> > 
> > This error sounds like a classloader thing. 
> Check the classpath and such
> > for 
> > and activation jars.   If you are on
> Java6, try removing the activation
> > jar we 
> > ship and such and using the stuff built into the jdk.
> > 
> > Dan
> > 
> > 
> > On Sat November 28 2009 3:50:59 pm baeschtu baeschtu
> wrote:
> >> I was getting a step forward while using the
> reference implementation
> >> large_upload from https://jax-ws.dev.java.net/2.1.7/
> >> Now I have the following problem. (I'm using
> maven)
> >> 
> >> Nov 28, 2009 9:44:32 PM
> org.apache.cxf.phase.PhaseInterceptorChain
> >> doIntercept
> >> WARNING: Application has thrown exception,
> unwinding now
> >> org.apache.cxf.interceptor.Fault: loader
> constraint violation: loader
> >> (instance of <bootloader>) previously
> initiated loading for a different
> >>  type with name
> "javax/activation/DataHandler"
> >>     at
> >>
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
> >> java:148)
> >> 
> >> Any help would be appreciated!
> >> 
> >> 
> >> 
> >> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
> >> 
> >> > Hi list
> >> > for a fileupload I need a mtom enabled
> webservice (wsdl first.) I
> >> managed
> >> > to write a working wsdl with wsdl2java
> >> > When I send large binaries ~5GB I got a:
> >> >
> >> > WARNING: Interceptor has thrown exception,
> unwinding now
> >> > org.apache.cxf.interceptor.Fault:
> Unmarshalling Error: Java heap space
> >> >
> >> > When I check with wireshark, for small files
> it looks like SwA seams to
> >> > work:
> >> > MIME Multipart Media Encapsulation, Type:
> multipart/related, Boundary:
> >> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
> >> >
> >> > When trying to upload large files I see only
> "Continuation or non-HTTP
> >> > traffic" and then follows the OutOfMemory
> exception.
> >> > 35506    5625.427090   
> 127.0.0.1    127.0.0.1    HTTP 
>   Continuation
> >> or
> >> > non-HTTP traffic.
> >> >
> >> > I also have the
> xmime:expectedContentTypes="application/octet-stream"
> >> in
> >> > and DataHandlers are generated.
> >> > Has someone a working example, or some
> hints?
> >> >
> >> > Thanks
> >> > Bast
> >> 
> > 
> > -- 
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog
> > 
> > 
> 
> -- 
> View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 


      

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
Iam using CXF 2.2.5 version and try to upload around 5 GB and got following
error.
Here is the stack trace 

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2882)
	at
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
	at java.lang.StringBuilder.append(StringBuilder.java:119)
	at
org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:334)
	at
org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:286)
	at
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback.onClose(LoggingOutInterceptor.java:152)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:182)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
	at $Proxy57.uploadVideo(Unknown Source)
	at
com.suraj.core.ws.VideoWebServiceTester.testVideoUpload(VideoWebServiceTester.java:70)
	at
com.suraj.core.ws.VideoWebServiceTester.main(VideoWebServiceTester.java:44)


dkulp wrote:
> 
> 
> This error sounds like a classloader thing.  Check the classpath and such
> for 
> and activation jars.   If you are on Java6, try removing the activation
> jar we 
> ship and such and using the stuff built into the jdk.
> 
> Dan
> 
> 
> On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
>> I was getting a step forward while using the reference implementation
>> large_upload from https://jax-ws.dev.java.net/2.1.7/
>> Now I have the following problem. (I'm using maven)
>> 
>> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
>> doIntercept
>> WARNING: Application has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
>> (instance of <bootloader>) previously initiated loading for a different
>>  type with name "javax/activation/DataHandler"
>>     at
>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
>> java:148)
>> 
>> Any help would be appreciated!
>> 
>> 
>> 
>> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
>> 
>> > Hi list
>> > for a fileupload I need a mtom enabled webservice (wsdl first.) I
>> managed
>> > to write a working wsdl with wsdl2java
>> > When I send large binaries ~5GB I got a:
>> >
>> > WARNING: Interceptor has thrown exception, unwinding now
>> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space
>> >
>> > When I check with wireshark, for small files it looks like SwA seams to
>> > work:
>> > MIME Multipart Media Encapsulation, Type: multipart/related, Boundary:
>> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>> >
>> > When trying to upload large files I see only "Continuation or non-HTTP
>> > traffic" and then follows the OutOfMemory exception.
>> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP    Continuation
>> or
>> > non-HTTP traffic.
>> >
>> > I also have the xmime:expectedContentTypes="application/octet-stream"
>> in
>> > and DataHandlers are generated.
>> > Has someone a working example, or some hints?
>> >
>> > Thanks
>> > Bast
>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26826658.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
This error sounds like a classloader thing.  Check the classpath and such for 
and activation jars.   If you are on Java6, try removing the activation jar we 
ship and such and using the stuff built into the jdk.

Dan


On Sat November 28 2009 3:50:59 pm baeschtu baeschtu wrote:
> I was getting a step forward while using the reference implementation
> large_upload from https://jax-ws.dev.java.net/2.1.7/
> Now I have the following problem. (I'm using maven)
> 
> Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> WARNING: Application has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: loader constraint violation: loader
> (instance of <bootloader>) previously initiated loading for a different
>  type with name "javax/activation/DataHandler"
>     at
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.
> java:148)
> 
> Any help would be appreciated!
> 
> 
> 
> 2009/11/27 baeschtu baeschtu <ba...@gmail.com>
> 
> > Hi list
> > for a fileupload I need a mtom enabled webservice (wsdl first.) I managed
> > to write a working wsdl with wsdl2java
> > When I send large binaries ~5GB I got a:
> >
> > WARNING: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space
> >
> > When I check with wireshark, for small files it looks like SwA seams to
> > work:
> > MIME Multipart Media Encapsulation, Type: multipart/related, Boundary:
> > "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
> >
> > When trying to upload large files I see only "Continuation or non-HTTP
> > traffic" and then follows the OutOfMemory exception.
> > 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP    Continuation or
> > non-HTTP traffic.
> >
> > I also have the xmime:expectedContentTypes="application/octet-stream" in
> > and DataHandlers are generated.
> > Has someone a working example, or some hints?
> >
> > Thanks
> > Bast
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: MTOM OutOfMemory

Posted by surajchhetry <su...@gmail.com>.
I am running into same problem . I have configure MTO to accept large file as
but iam getting out of memory exception.
 <jaxws:properties>
                       <entry key="mtom-enabled" value="true" />
                       <entry key="attachment-directory"
value="/home/temp/"/>
                       <entry key="attachment-memory-threshold"
value="4000000"/>
               </jaxws:properties>

Please help me how can i solve this issue?
-- 
View this message in context: http://old.nabble.com/MTOM-OutOfMemory-tp26544421p26591933.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM OutOfMemory

Posted by baeschtu baeschtu <ba...@gmail.com>.
I was getting a step forward while using the reference implementation
large_upload from https://jax-ws.dev.java.net/2.1.7/
Now I have the following problem. (I'm using maven)

Nov 28, 2009 9:44:32 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
WARNING: Application has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: loader constraint violation: loader
(instance of <bootloader>) previously initiated loading for a different type
with name "javax/activation/DataHandler"
    at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:148)

Any help would be appreciated!



2009/11/27 baeschtu baeschtu <ba...@gmail.com>

> Hi list
> for a fileupload I need a mtom enabled webservice (wsdl first.) I managed
> to write a working wsdl with wsdl2java
> When I send large binaries ~5GB I got a:
>
> WARNING: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space
>
> When I check with wireshark, for small files it looks like SwA seams to
> work:
> MIME Multipart Media Encapsulation, Type: multipart/related, Boundary:
> "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
>
> When trying to upload large files I see only "Continuation or non-HTTP
> traffic" and then follows the OutOfMemory exception.
> 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP    Continuation or
> non-HTTP traffic.
>
> I also have the xmime:expectedContentTypes="application/octet-stream" in
> and DataHandlers are generated.
> Has someone a working example, or some hints?
>
> Thanks
> Bast
>

Re: MTOM OutOfMemory

Posted by Daniel Kulp <dk...@apache.org>.
You don't mention what version of CXF you are using.   Make sure you are using 
2.2.5 as there was some work on MTOM streaming put in there.

We've definitely done some testing with large (but not 5G) files to make sure 
they work.   If you are using 2.2.5, I'd love to see a testcase of it not 
working.   (you can ommit the 5G file, I can use  dvd image or something.  
:-).    

Dan


On Fri November 27 2009 11:08:00 am baeschtu baeschtu wrote:
> Hi list
> for a fileupload I need a mtom enabled webservice (wsdl first.) I managed
>  to write a working wsdl with wsdl2java
> When I send large binaries ~5GB I got a:
> 
> WARNING: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space
> 
> When I check with wireshark, for small files it looks like SwA seams to
> work:
> MIME Multipart Media Encapsulation, Type: multipart/related, Boundary:
> "uuid:910305cf-e4c6-45cd-a0f6-4f083b49c6c4"
> 
> When trying to upload large files I see only "Continuation or non-HTTP
> traffic" and then follows the OutOfMemory exception.
> 35506    5625.427090    127.0.0.1    127.0.0.1    HTTP    Continuation or
> non-HTTP traffic.
> 
> I also have the xmime:expectedContentTypes="application/octet-stream" in
>  and DataHandlers are generated.
> Has someone a working example, or some hints?
> 
> Thanks
> Bast
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog