java.lang.OutOfMemoryError: Map failed

I'm getting this error when I'm trying to deploy a weblogic configuration.
It happens when it's trying to build the web facet. it fails with either building a WAR file or exploded directory.
I found the error in idea.log. I've already set the idea.exe.vmoptions to lots of memory
======================
-Xms1024m
-Xmx1024m
-XX:MaxPermSize=256m
-ea
-server
-Dsun.awt.keepWorkingSetOnMinimize=true
=======================
2009-06-03 10:38:52,475 [57371985]   INFO - r.IncrementalPackagingCompiler - Map failed
java.io.IOException: Map failed
    at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:761)
    at sun.nio.ch.FileChannelImpl.transferToTrustedChannel(FileChannelImpl.java:450)
    at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:523)
    at com.intellij.openapi.util.io.FileUtil.copy(FileUtil.java:516)
    at com.intellij.openapi.util.io.FileUtil.rename(FileUtil.java:628)
    at com.intellij.compiler.impl.packagingCompiler.JarsBuilder.renameFile(JarsBuilder.java:61)
    at com.intellij.compiler.impl.packagingCompiler.JarsBuilder.a(JarsBuilder.java:65)
    at com.intellij.compiler.impl.packagingCompiler.JarsBuilder.buildJars(JarsBuilder.java:60)
    at com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompiler.a(IncrementalPackagingCompiler.java:138)
    at com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompiler.access$500(IncrementalPackagingCompiler.java:94)
    at com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompiler$2.run(IncrementalPackagingCompiler.java:2)
    at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
    at com.intellij.openapi.application.ReadAction$1.run(ReadAction.java:35)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:343)
    at com.intellij.openapi.application.ReadAction.execute(ReadAction.java:33)
    at com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompiler.process(IncrementalPackagingCompiler.java:199)
    at com.intellij.compiler.impl.FileProcessingCompilerAdapter.process(FileProcessingCompilerAdapter.java:6)
    at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:378)
    at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:901)
    at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:228)
    at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:804)
    at com.intellij.compiler.impl.CompileDriver.access$400(CompileDriver.java:572)
    at com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:6)
    at com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:160)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:16)
    at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    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:619)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)
Caused by: java.lang.OutOfMemoryError: Map failed
    at sun.nio.ch.FileChannelImpl.map0(Native Method)
    at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758)
    ... 36 more

1 comment
Comment actions Permalink

Hello Eric,

The OutOfMemory error occurs while working with memory mapped files, which
use the memory outside of the JVM heap. Because of this, by setting an excessively
high value for -Xms and -Xmx, you actually reduce the amount of memory available
for memory mapped files. Please try decreasing -Xmx to 512M.

I'm getting this error when I'm trying to deploy a weblogic
configuration.
It happens when it's trying to build the web facet. it fails with
either building a WAR file or exploded directory.
I found the error in idea.log. I've already set the idea.exe.vmoptions
to lots of memory
======================
-Xms1024m
-Xmx1024m
-XX:MaxPermSize=256m
-ea
-server
-Dsun.awt.keepWorkingSetOnMinimize=true
=======================
2009-06-03 10:38:52,475 INFO -
r.IncrementalPackagingCompiler - Map failed
java.io.IOException: Map failed
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:761)
at
sun.nio.ch.FileChannelImpl.transferToTrustedChannel(FileChannelImpl.ja
va:450)
at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:523)
at com.intellij.openapi.util.io.FileUtil.copy(FileUtil.java:516)
at com.intellij.openapi.util.io.FileUtil.rename(FileUtil.java:628)
at
com.intellij.compiler.impl.packagingCompiler.JarsBuilder.renameFile(Ja
rsBuilder.java:61)
at
com.intellij.compiler.impl.packagingCompiler.JarsBuilder.a(JarsBuilder
.java:65)
at
com.intellij.compiler.impl.packagingCompiler.JarsBuilder.buildJars(Jar
sBuilder.java:60)
at
com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompi
ler.a(IncrementalPackagingCompiler.java:138)
at
com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompi
ler.access$500(IncrementalPackagingCompiler.java:94)
at
com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompi
ler$2.run(IncrementalPackagingCompiler.java:2)
at
com.intellij.openapi.application.RunResult.run(RunResult.java:38)
at
com.intellij.openapi.application.ReadAction$1.run(ReadAction.java:35)
at
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(Ap
plicationImpl.java:343)
at
com.intellij.openapi.application.ReadAction.execute(ReadAction.java:33
)
at
com.intellij.compiler.impl.packagingCompiler.IncrementalPackagingCompi
ler.process(IncrementalPackagingCompiler.java:199)
at
com.intellij.compiler.impl.FileProcessingCompilerAdapter.process(FileP
rocessingCompilerAdapter.java:6)
at
com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:378)
at
com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:901)
at
com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:228)
at
com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:804)
at
com.intellij.compiler.impl.CompileDriver.access$400(CompileDriver.java
:572)
at
com.intellij.compiler.impl.CompileDriver$4.run(CompileDriver.java:6)
at
com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:160)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.ru
n(ProgressManagerImpl.java:3)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressM
anagerImpl.java:5)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessU
nderProgress(ProgressManagerImpl.java:13)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(Prog
ressManagerImpl.java:101)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressM
anagerImpl.java:16)
at
com.intellij.openapi.application.impl.ApplicationImpl$5.run(Applicatio
nImpl.java:8)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441
)
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(ThreadPoolExecu
tor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:908)
at java.lang.Thread.run(Thread.java:619)
at
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(Applicat
ionImpl.java:5)
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758)
... 36 more
---
Original message URL:
http://www.jetbrains.net/devnet/message/5239342#5239342

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.