I am getting java.lang.OutOfMemoryError: Java heap space Exception while trying Marshal large number of objects in to XML, however previously i was using less object or less size of xml file that time JAXB marshaller.marshal(message, fi); was absolutely fine. Now as per new requirement in my project we need to increase data that in XML file i have tweak the logic as per new story. However after tweaking logic i run the report its looks fine 2-3 times after that started throw OOM exception.
Note : i have increase Xms, Xmx and XX:MaxPermSize but still facing same issue.
Could you guys please help me to get resolve this issue.