0

I've been facing this error for few days, appreciate if somebody could kindly advise.

My pom is configured with jboss auto deploy plugin version 7.1.1.Final. When I build the project from jenkins it builds fine but cannot deploy to jboss, fails with below exception:

Oct 21, 2013 6:55:02 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA

Authenticating against security realm: ManagementRealm

Exception in thread "management-client-thread 1-1" 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.jboss.as.protocol.StreamUtils.copyStream(StreamUtils.java:49)
    at     org.jboss.as.controller.client.impl.AbstractModelControllerClient$ReadAttachmentInputStreamRequestHandler.copyStream(AbstractModelControllerClient.java:226)
      at         org.jboss.as.controller.client.impl.AbstractModelControllerClient$ReadAttachmentInputStreamRequestHandler$1.execute(AbstractModelControllerClient.java:202)
    at     org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287)
    at         org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:487)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

This is jvm setting I've got: -Xms128m -Xmx512m -XX:MaxPermSize=256m

Thanks

Prash

4

1 回答 1

2

为 Maven 添加更多内存:

  1. ( Windows ) 将变量名称设置为 MAVEN_OPTS 并将变量值设置为-Xmx1024m (或更多)
  2. IntellijIdea设置 -> 构建、执行、部署 -> 构建工具 -> Maven -> 运行器 -> 将参数(-Xmx1024m(或更多))添加到 VM 选项。
于 2015-02-03T13:02:10.703 回答