You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by amazoone <am...@free.fr> on 2011/07/05 11:37:05 UTC

Download - MultiPart - Java heap space

Hello,

First, excuse my English cause i'm french.

I would like to create a webservice which allows a client to download a MP3.

This my code :

 #######
 # Server #
 #######

         /**
         * The Service return a MP3 converted in byte[]
         */
        @Produces("multipart/form-data")
	@Multipart(value = "root", type = "application/octet-stream")
	public byte[] getMp3() throws IOException {
		final java.io.File fichier = new File("my_mp3");
		final FileInputStream f = new FileInputStream(fichier);
		return inputStreamToByteArray(f);
        }

        /**
        * inputStreamToByteArray convert a Stream on a byte[]
        */
        public byte[] inputStreamToByteArray(InputStream inStream) throws
IOException {
	    ByteArrayOutputStream baos = new ByteArrayOutputStream();
	    byte[] buffer = new byte[8192];
	    int bytesRead;
	    while ((bytesRead = inStream.read(buffer)) > 0) {
	        baos.write(buffer, 0, bytesRead);
	    }
	    return baos.toByteArray();
	}


  ######
  # Client #
  ######

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

		final JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
		factory.getInInterceptors().add(new LoggingInInterceptor());
		factory.getOutInterceptors().add(new LoggingOutInterceptor());
		factory.setServiceClass(AuthService.class);
		factory.setAddress("http://localhost:9000/MultipartCXF/services/cxfAuth");
		
		final AuthService client = (AuthService) factory.create();
		byte[] musiqueIn = client.getMp3();
		
		
	    FileOutputStream musiqueOut = null;
	    try {
	    	convertByteToFile(musiqueIn, "test3.mp3");
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (musiqueOut != null) {
				musiqueOut.close();
		    }
		}
		System.exit(0);
	}

      public static void convertByteToFile (final byte[] tableau, final
String fic) throws java.io.IOException {
		try {
			final FileOutputStream f = new FileOutputStream(fic);
		    for (int i = 0; i < tableau.length; i++) {
   			    f.write((int)tableau[i]);
	    	}	 
			f.close();
		}
		catch(IOException e){
			System.out.println(e + " : erreur lors de la lecture du fichier");
		}
	}


#######
# RESULT#
#######

I get a Java heap space error, can someone help me ?
Whith a JPEG it's work perfectly.

Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:getMp3Response
xmlns:ns1="http://services.mp3server.omega.com/"><return>SUQzAwAAAANZMUdFT0IAAA[i
cut the byte[] for the
exemple]WIcl0huV3dtYxqQ1cZThH+2spmrYr0WFn6ta5he+znbv56uY6yta//uyAI6ABMgw1Os4wt6Z5zqtZxh
--------------------------------------
5 juil. 2011 11:32:20 org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
ATTENTION: Interceptor for
{http://services.mp3server.omega.com/}AuthServiceService#{http://services.mp3server.omega.com/}getMp3
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space 
	at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:798)
	at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:632)
	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
	at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
	at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
	at $Proxy31.getMp3(Unknown Source)
	at com.omega.mp3server.client.Client.main(Client.java:28)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at
com.sun.xml.bind.DatatypeConverterImpl._parseBase64Binary(DatatypeConverterImpl.java:652)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:879)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
	at
com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:334)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:212)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
	at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:768)
	at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:632)
	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
	at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
	at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException:
Unmarshalling Error: Java heap space 
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
	at $Proxy31.getMp3(Unknown Source)
	at com.omega.mp3server.client.Client.main(Client.java:28)
Caused by: java.lang.OutOfMemoryError: Java heap space
	at
com.sun.xml.bind.DatatypeConverterImpl._parseBase64Binary(DatatypeConverterImpl.java:652)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:879)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
	at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
	at
com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:334)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:212)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
	at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:768)
	at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:632)
	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
	at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
	at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)




--
View this message in context: http://cxf.547215.n5.nabble.com/Download-MultiPart-Java-heap-space-tp4552691p4552691.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: Download - MultiPart - Java heap space

Posted by amazoone <am...@free.fr>.
Hi, sure ! this is my code.
I hope it will be usefull

# The interface

*@WebService
public interface MediaService {

	/**
	 * Provides a service wich allow to get a specific mp3
	 */
	public byte[] getMp3() throws FileNotFoundException, IOException;

}*

# The implementation

*public class MediaServiceImpl implements MediaService {

	private ResourceBundle properties;
	
	public MediaServiceImpl() {
		super();
		try {
			this.properties = ResourceBundle.getBundle("config");
		} catch (java.util.MissingResourceException mre) {
			mre.printStackTrace();
		}
	}

	/**
	 * Provides a service wich allow to get a specific mp3
	 * @author mickaël.camelot
	 */
	@GET
	@Produces("audio/x-mpeg")
	public byte[] getMp3() throws IOException {
		final java.io.File fichier = new File(properties.getString("mp3uri"));
		final FileInputStream f = new FileInputStream(fichier);
		return FileUtils.inputStreamToByteArray(f);
	}
}*

# The Utilities Class

public class FileUtils {
	
	/**
	 * Convert a byte[] to a File
	 * @param bytes
	 * @param file
	 * @throws java.io.IOException
	 */
	public static void byteToFile(final byte[] bytes, final String file) throws
java.io.IOException {
		try {
			final FileOutputStream fileOutputStream = new FileOutputStream(file);
			for (int i = 0; i < bytes.length; i++) {
				fileOutputStream.write((int) bytes[i]);
			}
			fileOutputStream.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * Convert a Stream to a byte[]
	 * @param inStream the media converted to a Stream
	 * @return byte[] the stream converted to a byte[]
	 * @throws IOException
	 */
	public static byte[] inputStreamToByteArray(final InputStream inStream)
throws IOException {
	    final ByteArrayOutputStream byteArrayOutputStream = new
ByteArrayOutputStream();
	    final byte[] buffer = new byte[8192];
	    int bytesRead;
	    while ((bytesRead = inStream.read(buffer)) > 0) {
	        byteArrayOutputStream.write(buffer, 0, bytesRead);
	    }
	    return byteArrayOutputStream.toByteArray();
	}
}

# The cfx file
*
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://cxf.apache.org/core"
	xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:jaxws="http://cxf.apache.org/jaxws"

	xsi:schemaLocation="http://www.springframework.org/schema/beans
	       http://www.springframework.org/schema/beans/spring-beans.xsd
		   http://cxf.apache.org/core 
		   http://cxf.apache.org/schemas/core.xsd
	       http://cxf.apache.org/jaxrs
		   http://cxf.apache.org/schemas/jaxrs.xsd
	       http://cxf.apache.org/jaxws
	       http://cxf.apache.org/schemas/jaxws.xsd">

	<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" />
	
  <jaxrs:server id="media"
      serviceClass="com.partage.services.MediaServiceImpl"
      address="/mediaService"/>
  
</beans>*

# the web.xml
*
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
	xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<display-name>CFX Partage</display-name>

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:com/partage/services/cxf.xml</param-value>
	</context-param>

	<listener>
	    <listener-class>
	      org.springframework.web.context.ContextLoaderListener
	    </listener-class>
  	</listener>
  
	<servlet>
	    <servlet-name>CXFServlet</servlet-name>
	    <servlet-class>
	        org.apache.cxf.transport.servlet.CXFServlet
	    </servlet-class>
  	</servlet>
  
	<servlet-mapping>
	    <servlet-name>CXFServlet</servlet-name>
	    <url-pattern>/services/*</url-pattern>
  	</servlet-mapping>
  
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
	</welcome-file-list>
</web-app>*

--
View this message in context: http://cxf.547215.n5.nabble.com/Download-MultiPart-Java-heap-space-tp4552691p4560497.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: Download - MultiPart - Java heap space

Posted by "Malisetti, Ramanjaneyulu" <Ra...@ca.com>.
Can you share your code? We also have similar requirement to stream log
files over REST service.

Regards
Raman

-----Original Message-----
From: amazoone [mailto:amazoone@free.fr] 
Sent: Wednesday, July 06, 2011 1:09 PM
To: users@cxf.apache.org
Subject: Re: Download - MultiPart - Java heap space

Hi,

thanks for your advice ! it was usefull !
it works now.

i use JAX-RS instead of JAX-WS.

The problem was that i used SOAP instead of HTTP.

thanks a lot.

--
View this message in context:
http://cxf.547215.n5.nabble.com/Download-MultiPart-Java-heap-space-tp455
2691p4556029.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Download - MultiPart - Java heap space

Posted by amazoone <am...@free.fr>.
Hi,

thanks for your advice ! it was usefull !
it works now.

i use JAX-RS instead of JAX-WS.

The problem was that i used SOAP instead of HTTP.

thanks a lot.

--
View this message in context: http://cxf.547215.n5.nabble.com/Download-MultiPart-Java-heap-space-tp4552691p4556029.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Download - MultiPart - Java heap space

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

On Tue, Jul 5, 2011 at 10:37 AM, amazoone <am...@free.fr> wrote:
>
> Hello,
>
> First, excuse my English cause i'm french.
>
> I would like to create a webservice which allows a client to download a MP3.
>
> This my code :
>
>  #######
>  # Server #
>  #######
>
>         /**
>         * The Service return a MP3 converted in byte[]
>         */
>        @Produces("multipart/form-data")
>        @Multipart(value = "root", type = "application/octet-stream")
>        public byte[] getMp3() throws IOException {
>                final java.io.File fichier = new File("my_mp3");
>                final FileInputStream f = new FileInputStream(fichier);
>                return inputStreamToByteArray(f);
>        }
>
>        /**
>        * inputStreamToByteArray convert a Stream on a byte[]
>        */
>        public byte[] inputStreamToByteArray(InputStream inStream) throws
> IOException {
>            ByteArrayOutputStream baos = new ByteArrayOutputStream();
>            byte[] buffer = new byte[8192];
>            int bytesRead;
>            while ((bytesRead = inStream.read(buffer)) > 0) {
>                baos.write(buffer, 0, bytesRead);
>            }
>            return baos.toByteArray();
>        }

The above code uses JAX-RS annotations, just mentioning it given that
the client code below is JAX-WS centric.
If you do intend to have a JAXRS endpoint then consider returning
InputStream instead, or (JAX-RS) StreamingOutput.


>
>
>  ######
>  # Client #
>  ######
>
>       public static void main(String args[]) throws Exception {
>
>                final JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>                factory.getInInterceptors().add(new LoggingInInterceptor());
>                factory.getOutInterceptors().add(new LoggingOutInterceptor());
>                factory.setServiceClass(AuthService.class);
>                factory.setAddress("http://localhost:9000/MultipartCXF/services/cxfAuth");
>
>                final AuthService client = (AuthService) factory.create();
>                byte[] musiqueIn = client.getMp3();
>
>
>            FileOutputStream musiqueOut = null;
>            try {
>                convertByteToFile(musiqueIn, "test3.mp3");
>                } catch (IOException e) {
>                        e.printStackTrace();
>                } finally {
>                        if (musiqueOut != null) {
>                                musiqueOut.close();
>                    }
>                }
>                System.exit(0);
>        }

The above code relies on CXF JAX-WS factory bean, so I'm not sure how
it works for JPEG...
Unless you configure CXF HTTP Binding somewhere ?

Cheers, Sergey

> #######
> # RESULT#
> #######
>
> I get a Java heap space error, can someone help me ?
> Whith a JPEG it's work perfectly.
>
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:getMp3Response
> xmlns:ns1="http://services.mp3server.omega.com/"><return>SUQzAwAAAANZMUdFT0IAAA[i
> cut the byte[] for the
> exemple]WIcl0huV3dtYxqQ1cZThH+2spmrYr0WFn6ta5he+znbv56uY6yta//uyAI6ABMgw1Os4wt6Z5zqtZxh
> --------------------------------------
> 5 juil. 2011 11:32:20 org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> ATTENTION: Interceptor for
> {http://services.mp3server.omega.com/}AuthServiceService#{http://services.mp3server.omega.com/}getMp3
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Java heap space
>        at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:798)
>        at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:632)
>        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
>        at
> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
>        at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
>        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
>        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
>        at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
>        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>        at $Proxy31.getMp3(Unknown Source)
>        at com.omega.mp3server.client.Client.main(Client.java:28)
> Caused by: java.lang.OutOfMemoryError: Java heap space
>        at
> com.sun.xml.bind.DatatypeConverterImpl._parseBase64Binary(DatatypeConverterImpl.java:652)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:879)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
>        at
> com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:334)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:212)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
>        at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:768)
>        at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:632)
>        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
>        at
> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
>        at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
>        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
>        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
>        at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException:
> Unmarshalling Error: Java heap space
>        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
>        at $Proxy31.getMp3(Unknown Source)
>        at com.omega.mp3server.client.Client.main(Client.java:28)
> Caused by: java.lang.OutOfMemoryError: Java heap space
>        at
> com.sun.xml.bind.DatatypeConverterImpl._parseBase64Binary(DatatypeConverterImpl.java:652)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:879)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
>        at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
>        at
> com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:334)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:212)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
>        at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
>        at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:768)
>        at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:632)
>        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
>        at
> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
>        at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
>        at
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
>        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
>        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
>        at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Download-MultiPart-Java-heap-space-tp4552691p4552691.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>