0 Replies Latest reply on Jun 15, 2012 11:33 AM by gboro54

    java.lang.OutOfMemoryError: Java heap space

    gboro54 Novice

      I am trying to run my test suite from maven using JBoss 7.1.1. At first I thought that my server was running out of memory. However, after increasing the heap(and looking at logs), it appears this is happening during the shrinkwrapping. Any thoughts?

       

      Exception in thread "management-client-thread 1-2" java.lang.OutOfMemoryError: Java heap space

              at java.util.Arrays.copyOf(Arrays.java:2786)

              at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)

              at org.jboss.as.protocol.StreamUtils.copyStream(StreamUtils.java:49)

              at org.jboss.as.controller.client.impl.AbstractModelControllerClient$ReadAttachmentInputStreamRequestHandler.copyStream(AbstractModelControlle

      rClient.java:226)

              at org.jboss.as.controller.client.impl.AbstractModelControllerClient$ReadAttachmentInputStreamRequestHandler$1.execute(AbstractModelController

      Client.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$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Jun 15, 2012 11:24:20 AM org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call

      WARNING: Exception encountered during export of archive

      org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /lib/maven-model-builder-3.0.1.jar

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:272)

              at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:219)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:233)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:105)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:95)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:50)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:121)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:116)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:124)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: java.io.IOException: Read end dead

              at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:246)

              at java.io.PipedInputStream.receive(PipedInputStream.java:210)

              at java.io.PipedOutputStream.write(PipedOutputStream.java:132)

              at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161)

              at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:118)

              at java.util.zip.ZipOutputStream.write(ZipOutputStream.java:272)

              at org.jboss.shrinkwrap.impl.base.io.IOUtil.copy(IOUtil.java:139)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:261)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:233)

              at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:217)

              ... 14 more

      Jun 15, 2012 11:24:20 AM org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call

      WARNING: [SHRINKWRAP-120] Possible deadlock scenario: Got exception on closing the ZIP out stream: Read end dead

      java.io.IOException: Read end dead

              at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:246)

              at java.io.PipedInputStream.receive(PipedInputStream.java:210)

              at java.io.PipedOutputStream.write(PipedOutputStream.java:132)

              at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:161)

              at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:196)

              at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:301)

              at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)

              at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:321)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:148)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

      Jun 15, 2012 11:24:21 AM org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call

      WARNING: Exception encountered during export of archive

      org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /org/apache/maven/model/profile/DefaultProfileInjector$1.cl

      ass

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:272)

              at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:219)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:233)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:105)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)

              at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:95)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:50)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:121)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:116)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:124)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: java.io.IOException: Pipe closed

              at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)

              at java.io.PipedInputStream.receive(PipedInputStream.java:185)

              at java.io.PipedOutputStream.write(PipedOutputStream.java:105)

              at java.util.zip.ZipOutputStream.writeInt(ZipOutputStream.java:445)

              at java.util.zip.ZipOutputStream.writeEXT(ZipOutputStream.java:362)

              at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:220)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:84)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:40)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:265)

              at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:233)

              at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:217)

              ... 18 more

      Jun 15, 2012 11:24:21 AM org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call

      WARNING: [SHRINKWRAP-120] Possible deadlock scenario: Got exception on closing the ZIP out stream: Pipe closed

      java.io.IOException: Pipe closed

              at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)

              at java.io.PipedInputStream.receive(PipedInputStream.java:185)

              at java.io.PipedOutputStream.write(PipedOutputStream.java:105)

              at java.util.zip.ZipOutputStream.writeInt(ZipOutputStream.java:445)

              at java.util.zip.ZipOutputStream.writeEXT(ZipOutputStream.java:362)

              at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:220)

              at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:301)

              at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)

              at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:321)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:148)

              at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)