You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Warner Onstine <sw...@warneronstine.com> on 2004/05/26 22:17:20 UTC

OutOfMemory Error when running test

I'm busy converting an Ant build over to Maven and have run into a 
problem running tests. I have tried this on two different systems with 
slightly different results, one system is running OS X Panther and the 
other WinXP.

On OS X the tests fail in one place with an OutOfMemory error, on the 
XP machine the tests fail a little further down the list of test cases, 
but also with an OOM error. On both boxes I have tried to increase the 
memory through MAVEN_OPTS.

-Xms512m -Xmx768m

However on both boxes the tests still fail at the same point which 
doesn't make any sense to me, as if I increased the VM memory it should 
at least get further, right?

Additionally I have run the test that it fails on independently with no 
problems, as well as the test after it with no problems. I also tried 
to fork the VM which resulted in another error:

     [junit] Running com.fotozap.data.dao.AffiliateDAOTest
     [junit] Exception in thread "main" java.lang.NoClassDefFoundError: 
org/w3c/dom/ranges/DocumentRange
     [junit]     at java.lang.ClassLoader.defineClass0(Native Method)
     [junit]     at 
java.lang.ClassLoader.defineClass(ClassLoader.java:537)
     [junit]     at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
     [junit]     at 
java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
     [junit]     at 
java.net.URLClassLoader.access$100(URLClassLoader.java:55)
     [junit]     at 
java.net.URLClassLoader$1.run(URLClassLoader.java:194)
     [junit]     at java.security.AccessController.doPrivileged(Native 
Method)
     [junit]     at 
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
     [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

Here is the exception from the XP box (I also have the maven -X output 
if anyone needs it):

BUILD FAILED
File...... C:\Documents and Settings\Tim
Hoyt\.maven\plugins\maven-test-plugin-1
.6.1\plugin.jelly
Element... j:if
Line...... 105
Column.... 107
java.lang.OutOfMemoryError
com.werken.werkz.UnattainableGoalException: Unable to obtain goal
[test:test] --
  C:\Documents and Settings\Tim
Hoyt\.maven\plugins\maven-test-plugin-1.6.1\plugi
n.jelly:105:107: <j:if> java.lang.OutOfMemoryError
         at com.werken.werkz.Goal.fire(Goal.java:646)
         at com.werken.werkz.Goal.attain(Goal.java:575)
         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
         at com.werken.werkz.Goal.attain(Goal.java:573)
         at 
com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
         at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
610)
         at 
org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
         at org.apache.maven.cli.App.doMain(App.java:485)
         at org.apache.maven.cli.App.main(App.java:1214)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.werken.forehead.Forehead.run(Forehead.java:551)
         at com.werken.forehead.Forehead.main(Forehead.java:581)
org.apache.commons.jelly.JellyTagException: C:\Documents and 
Settings\Tim
Hoyt\.
maven\plugins\maven-test-plugin-1.6.1\plugin.jelly:105:107: <j:if>
java.lang.Out
OfMemoryError
         at
org.apache.commons.jelly.impl.TagScript.handleException(TagScript.jav
a:702)
         at 
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:296)
         at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
         at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:79)
         at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:110)
         at com.werken.werkz.Goal.fire(Goal.java:639)
         at com.werken.werkz.Goal.attain(Goal.java:575)
         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
         at com.werken.werkz.Goal.attain(Goal.java:573)
         at 
com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
         at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
610)
         at 
org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
         at org.apache.maven.cli.App.doMain(App.java:485)
         at org.apache.maven.cli.App.main(App.java:1214)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.werken.forehead.Forehead.run(Forehead.java:551)
         at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: java.lang.OutOfMemoryError
Root cause
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError

Any ideas?

-warner


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: OutOfMemory Error when running test

Posted by Warner Onstine <sw...@warneronstine.com>.
Strangely enough we fixed this by blowing away the plugins directory  
and reinstalling Maven on both machines.

Any ideas on what may have been going on?

-warner

On May 26, 2004, at 1:17 PM, Warner Onstine wrote:

> I'm busy converting an Ant build over to Maven and have run into a  
> problem running tests. I have tried this on two different systems with  
> slightly different results, one system is running OS X Panther and the  
> other WinXP.
>
> On OS X the tests fail in one place with an OutOfMemory error, on the  
> XP machine the tests fail a little further down the list of test  
> cases, but also with an OOM error. On both boxes I have tried to  
> increase the memory through MAVEN_OPTS.
>
> -Xms512m -Xmx768m
>
> However on both boxes the tests still fail at the same point which  
> doesn't make any sense to me, as if I increased the VM memory it  
> should at least get further, right?
>
> Additionally I have run the test that it fails on independently with  
> no problems, as well as the test after it with no problems. I also  
> tried to fork the VM which resulted in another error:
>
>     [junit] Running com.fotozap.data.dao.AffiliateDAOTest
>     [junit] Exception in thread "main" java.lang.NoClassDefFoundError:  
> org/w3c/dom/ranges/DocumentRange
>     [junit]     at java.lang.ClassLoader.defineClass0(Native Method)
>     [junit]     at  
> java.lang.ClassLoader.defineClass(ClassLoader.java:537)
>     [junit]     at  
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java: 
> 123)
>     [junit]     at  
> java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
>     [junit]     at  
> java.net.URLClassLoader.access$100(URLClassLoader.java:55)
>     [junit]     at  
> java.net.URLClassLoader$1.run(URLClassLoader.java:194)
>     [junit]     at java.security.AccessController.doPrivileged(Native  
> Method)
>     [junit]     at  
> java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>     [junit]     at  
> java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>
> Here is the exception from the XP box (I also have the maven -X output  
> if anyone needs it):
>
> BUILD FAILED
> File...... C:\Documents and Settings\Tim
> Hoyt\.maven\plugins\maven-test-plugin-1
> .6.1\plugin.jelly
> Element... j:if
> Line...... 105
> Column.... 107
> java.lang.OutOfMemoryError
> com.werken.werkz.UnattainableGoalException: Unable to obtain goal
> [test:test] --
>  C:\Documents and Settings\Tim
> Hoyt\.maven\plugins\maven-test-plugin-1.6.1\plugi
> n.jelly:105:107: <j:if> java.lang.OutOfMemoryError
>         at com.werken.werkz.Goal.fire(Goal.java:646)
>         at com.werken.werkz.Goal.attain(Goal.java:575)
>         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
>         at com.werken.werkz.Goal.attain(Goal.java:573)
>         at  
> com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
>         at
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
> 610)
>         at  
> org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
>         at org.apache.maven.cli.App.doMain(App.java:485)
>         at org.apache.maven.cli.App.main(App.java:1214)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at com.werken.forehead.Forehead.run(Forehead.java:551)
>         at com.werken.forehead.Forehead.main(Forehead.java:581)
> org.apache.commons.jelly.JellyTagException: C:\Documents and  
> Settings\Tim
> Hoyt\.
> maven\plugins\maven-test-plugin-1.6.1\plugin.jelly:105:107: <j:if>
> java.lang.Out
> OfMemoryError
>         at
> org.apache.commons.jelly.impl.TagScript.handleException(TagScript.jav
> a:702)
>         at  
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:296)
>         at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
>         at
> org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
> g.java:79)
>         at
> org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
> mAction(MavenGoalTag.java:110)
>         at com.werken.werkz.Goal.fire(Goal.java:639)
>         at com.werken.werkz.Goal.attain(Goal.java:575)
>         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
>         at com.werken.werkz.Goal.attain(Goal.java:573)
>         at  
> com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
>         at
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
> 610)
>         at  
> org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
>         at org.apache.maven.cli.App.doMain(App.java:485)
>         at org.apache.maven.cli.App.main(App.java:1214)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at com.werken.forehead.Forehead.run(Forehead.java:551)
>         at com.werken.forehead.Forehead.main(Forehead.java:581)
> Caused by: java.lang.OutOfMemoryError
> Root cause
> java.lang.OutOfMemoryError
> java.lang.OutOfMemoryError
>
> Any ideas?
>
> -warner
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org