Getting java.lang.OutOfMemoryError: Java heap space

151 views
Skip to first unread message

Prakhash Sivakumar

unread,
Jul 11, 2016, 10:56:15 PM7/11/16
to Jenkins Users
Hi all,
I'm using Jenkins which is deployed on tomcat server. I'm getting the below error when running a task in Jenkins. I have searched for the possibilities which are mentioned on [1] , but I couldn't find any Jenkins related configuration files mentioned. Please provide suggestions to handle this issue



45554 [ZAP-ProxyThread-5] ERROR org.zaproxy.zap.ZAP$UncaughtExceptionLogger  - Exception in thread "ZAP-ProxyThread-5"
java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:569)
	at java.lang.StringBuilder.append(StringBuilder.java:190)
	at com.sun.jersey.core.util.ReaderWriter.readFromAsString(ReaderWriter.java:172)
	at com.sun.jersey.core.util.ReaderWriter.readFromAsString(ReaderWriter.java:157)
	at com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.readFromAsString(AbstractMessageReaderWriterProvider.java:114)
	at com.sun.jersey.core.impl.provider.entity.StringProvider.readFrom(StringProvider.java:73)
	at com.sun.jersey.core.impl.provider.entity.StringProvider.readFrom(StringProvider.java:58)
	at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:553)
	at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:506)
	at org.zaproxy.zap.extension.wso2jiraissuecreator.JiraRestClient.invokeGetMethod(JiraRestClient.java:43)
	at org.zaproxy.zap.extension.wso2jiraissuecreator.XmlDomParser.getAllOpenIssues(XmlDomParser.java:327)
	at org.zaproxy.zap.extension.wso2jiraissuecreator.XmlDomParser.parseXmlDoc(XmlDomParser.java:57)
	at org.zaproxy.zap.extension.wso2jiraissuecreator.ExtensionJiraIssueCreater.createJiraIssues(ExtensionJiraIssueCreater.java:215)
	at org.zaproxy.zap.extension.wso2jiraissuecreator.JiraIssueCreaterAPI.handleApiAction(JiraIssueCreaterAPI.java:60)
	at org.zaproxy.zap.extension.api.API.handleApiRequest(Unknown Source)
	at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(Unknown Source)
	at org.parosproxy.paros.core.proxy.ProxyThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)


Thanks

Werner Keil

unread,
Jul 12, 2016, 7:08:33 AM7/12/16
to Jenkins Users
Hi,

The link you mentioned helps if you run Jenkins "standalone" meaning with its own app server (usually installed via apt-get or similar)
I used it and know it works for this Jenkins setup.

If you deployed the Jenkins WAR into Tomcat, you have to adjust memory there, see e.g. the Tomcat Wiki: https://wiki.apache.org/tomcat/FAQ/Memory

I don't know all the various Jenkins plugins out there, but
JiraIssueCreaterAPI
in org.zaproxy to me does not sound like it has anything to do with Jenkins at all. Are you running JIRA or Confluence on that same Tomcat?

Regards,
Werner Keil

Prakhash Sivakumar

unread,
Jul 14, 2016, 10:22:16 PM7/14/16
to Jenkins Users
Hi Keil,
Sorry for the late response.

I got it done. Thanks, I was implemented the JiraIssueCreaterAPI which loads all the existing Jira to memory & do the processing, It encountered a memory leakage issue.

Thanks
Reply all
Reply to author
Forward
0 new messages