java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2271)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
at org.apache.cxf.io.CachedOutputStream.write(CachedOutputStream.java:461)
at org.apache.cxf.helpers.IOUtils.copy(IOUtils.java:160)
at org.apache.cxf.helpers.IOUtils.copy(IOUtils.java:104)
at org.apache.cxf.attachment.AttachmentDataSource.cache(AttachmentDataSource.java:52)
at org.apache.cxf.attachment.AttachmentDeserializer.cacheStreamedAttachments(AttachmentDeserializer.java:20
8)
If you are using CxfSerlvet, it lets you define the buffer memory (attachment-memory-threshold) and the max upload size (attachment-max-size)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<jaxrs:server address="/api"> | |
<jaxrs:properties> | |
<entry key="org.apache.cxf.propogate.exception" value="false"/> | |
<entry key="attachment-directory" value="/mnt/wundr_temp"/> | |
<entry key="attachment-memory-threshold" value="404800"/> | |
<entry key="attachment-max-size" value="1073741824"/> | |
</jaxrs:properties> | |
</jaxrs:server> |
If you are sure you have these set correctly, make sure the attachment-directory exists. If it does, make sure tomcat has permission to write to it.
No comments:
Post a Comment