function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TehNrdTehNrd 

ANT deployment error: java.lang.OutOfMemoryError

Any one know how we can allocate more memory to ant for deployments? In windows we tried creating an enviromental variable with name =  ANT_OPTS and value = -Xmx640m but this made no difference.

 

Any other ideas?

 

 

BUILD FAILED java.lang.OutOfMemoryError: Java heap space at com.sforce.ws.parser.MXParser.fillBuf(MXParser.java:2874) at com.sforce.ws.parser.MXParser.more(MXParser.java:2951) at com.sforce.ws.parser.MXParser.nextImpl(MXParser.java:1334) at com.sforce.ws.parser.MXParser.next(MXParser.java:1049) at com.sforce.ws.parser.MXParser.nextText(MXParser.java:1016) at com.sforce.ws.parser.XmlInputStream.nextText(XmlInputStream.java:124) at com.sforce.ws.bind.TypeMapper.readString(TypeMapper.java:407) at com.sforce.soap.metadata.DebuggingInfo_element.loadFields(DebuggingInfo_element.java:68) at com.sforce.soap.metadata.DebuggingInfo_element.load(DebuggingInfo_element.java:59) at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:564) at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:475) at com.sforce.ws.transport.SoapConnection.readSoapHeader(SoapConnection.java:229) at com.sforce.ws.transport.SoapConnection.readSoapEnvelopeStart(SoapConnection.java:207) at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:126) at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:110) at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:92) at com.sforce.soap.metadata.MetadataConnection.checkDeployStatus(MetadataConnection.java:152) at com.salesforce.ant.DeployTask.handleResponse(DeployTask.java:97) at com.salesforce.ant.SFDCMDAPIAntTaskRunner.runTask(SFDCMDAPIAntTaskRunner.java:107) at com.salesforce.ant.DeployTask.execute(DeployTask.java:51) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

Thanks,

Jason

 

 

TehNrdTehNrd

Case # 02722203.

 

No deployemnts are working. We can't update existing code or deploy new code. :smileysad:

Message Edited by TehNrd on 06-12-2009 01:11 PM
SuvavSuvav

I am also getting the same ANT error: java.lang.OutOfMemoryError : java heap space

when trying to retrieve the EmailTemplates, dashboards and Documents.

 

I guess its because it has large number of records. But earlier when i tried retrieving all( EmailTemplates, dashboards and Documents) at a time, it gave me limit exceeded 1500 rows error. After i changed to any of these types for retrieval it gave me the above error(java.lang.OutOfMemoryError : java heap space).

 

Can anybody please suggest the solution for this?

 

  

  Did u get any solution for this?

 

Regards,

Su

TehNrdTehNrd

We ended up created a environmental variable that allocates alot of memory:

 

 ANT_OPTS=-Xmx1024m

 

You don't actually have to wait for ANT to return the results if you monitor the deployments in the UI, as soon as it completes with no errors, you can close the command prompt window and it will still deploy successfully.

 

-Jason