You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@codehaus.org> on 2012/02/13 22:21:02 UTC

[jira] (MRELEASE-587) release:prepare ends up with FATAL ERROR (java.lang.OutOfMemoryError: Java heap space)

     [ https://jira.codehaus.org/browse/MRELEASE-587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MRELEASE-587.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Robert Scholte

No, it is not possible to have a better message, we're talking about an {{OutOfMemoryError}}, an _Error_ and not an _Exception_.

Let's quote [java.lang.Error|http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Error.html]
{quote}
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath error, though a "normal" condition, is also a subclass of Error because most applications should not try to catch it. 

A method is not required to declare in its throws clause any subclasses of Error that might be thrown during the execution of the method but not caught, since these errors are abnormal conditions that should never occur.
{quote}

The solution: add more memory to the JVM. This is actually a FAQ (just google) and here's a hint: [MAVEN_OPTS|http://maven.apache.org/download.html#Installation_Instructions]
                
> release:prepare ends up with FATAL ERROR (java.lang.OutOfMemoryError: Java heap space)
> --------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-587
>                 URL: https://jira.codehaus.org/browse/MRELEASE-587
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.0
>         Environment: Windows XP
>            Reporter: Teemu Lehto
>            Assignee: Robert Scholte
>            Priority: Minor
>
> OutOfMemoryError occurs if unit tests (for example) write a lot of debug messages to console.
> prepare works fine when logging level is something else than DEBUG
> Is it possible to somehow get better error message???
> Here is a stack trace:
> [INFO] Trace
> java.lang.OutOfMemoryError: Java heap space at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
> at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:393)
> at java.lang.StringBuffer.append(StringBuffer.java:225)
> at org.apache.maven.shared.release.ReleaseResult.appendOutput(ReleaseResult.java:85)
> at org.apache.maven.shared.release.exec.ForkedMavenExecutor.executeGoals(ForkedMavenExecutor.java:118)
> at org.apache.maven.shared.release.exec.ForkedMavenExecutor.executeGoals(ForkedMavenExecutor.java:126)
> at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:59)
> at org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.execute(RunPrepareGoalsPhase.java:42)
> at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:194)
> at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:131)
> at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:94)
> at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:136)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 minutes 2 seconds
> [INFO] Finished at: Mon Aug 09 15:49:17 EEST 2010 [INFO] Final Memory: 16M/1016M [INFO] ------------------------------------------------------------------------

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira