Issue using Apache CXF with MTOM
shamik Jun 19, 2013 2:44 AMHi,
I'm running a cxf soap webservice in fuse 4.3 . I've configured the endpoint to return a large file leveraging MTOM. The client code is generated using cxf wsdl2java. When the client code it retrieving the file, it encounters out of memory exception. Here's the trace :
Exception in thread "taskExecutor-12" 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:515)
at java.lang.StringBuilder.append(StringBuilder.java:189)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleCharacters(StAXStreamConnector.java:312)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:176)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:349)
at com.sun.xml.internal.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:109)
at com.sun.xml.internal.bind.api.Bridge.unmarshal(Bridge.java:222)
at com.sun.xml.internal.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:514)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:110)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy33.getFile(Unknown Source)
As Daniel Kulp from cxf forum pointed out, seems like it's using JAX-WS RI instead of CXF. Could this be the issue ? I'm using spring-dm to define the end-point, while related cxf imports are defined in the pom file.
I've checked etc/jre.properties , JAX-WS API references are being commented out as part of the Fuse distribution. I've checked the deployed bundles, only cxf packages are present.
Any pointer will be highly appreciated.
- Thanks
Edited by: shamik on Jun 19, 2013 6:43 AM