You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Hughes <ah...@gmail.com> on 2009/04/02 06:23:45 UTC
Reporting Plugin's and OutOfMemoryException's
Howdy,
I consistently hit OutOfMemoryException's with site:site and require a
solution.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Java heap space
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
I have seen solutions that require the following to be added to mvn.bat (or
mvn on *nix). I tried this, it did not work. Also I have a problem with this
solution as it resolves the issue on my machine only. It fails to resolve
the issue for the rest of my team.
Even this causes the exception to be raised...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<!-- version>2.2</version -->
<configuration>
<argLine>-Xmx512m -Xms128m</argLine>
</configuration>
</plugin>
</plugins>
<reporting>
I'd really appreciate some help, this has been buggin me for almost two days
now :'(
Cheers,
AH
Re: Reporting Plugin's and OutOfMemoryException's
Posted by Stephen Connolly <st...@gmail.com>.
don't use aggregate with the reporting as it messes up your build...
try setting inherited to false for the reporting plugin config... it
might just reduce your issues
Sent from my [rhymes with myPod] ;-)
On 6 Apr 2009, at 06:51, Andrew Hughes <ah...@gmail.com> wrote:
> Hi Wayne, thanks again.. as you rightfully point out I have some
> incorrect
> argLine usage that I had copy/pasted from another plugin where it was
> applicable.
> One problem seems to be with the javadoc plugin... there's a few weird
> things going on.
> + The argline was wrong and this is how it's done...
> http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#How_to_increase_Javadoc_heap_size
> + Each Module is called MANY times by the plugin (over and over
> and....
> site:site takes about 15/20 mins to build - frustration).
> + Even with 1g of mem I still get OutOfMemoryError, indicates memory
> size is
> not the problems source.
>
> Each module site:site, seems to trigger a site:site of all OTHER
> modules
> (order n^2). I suspected that this has something to do with
> aggregate but I
> have tried both true&false and it just keeps on calling the modules
> over and
> over and.... again. I've also fixed the version to 2.5 so that
> others take a
> look at the same plugin as me
>
> This is my javadoc plugin if someone wants to take it for a quick
> spin...
>
> <project>
> <reporting>
> ...
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.5</version>
> <configuration>
> <minmemory>128m</minmemory>
> <maxmemory>1g</maxmemory>
> <source>1.6</source>
> <aggregate>true</aggregate>
> <doclet>gr.spinellis.umlgraph.doclet.UmlGraphDoc</doclet>
> <docletArtifact>
> <groupId>gr.spinellis</groupId>
> <artifactId>UmlGraph</artifactId>
> <version>4.6</version>
> </docletArtifact>
> <additionalparam>
> -inferrel -inferdep -quiet -hide java.*
> -collpackages java.util.* -qualify
> -postfixpackage -nodefontsize 9
> -nodefontpackagesize 7
> </additionalparam>
> <links>
> <link>http://java.sun.com/j2se/1.4.2/docs/api</link>
> <link>http://java.sun.com/j2ee/1.4/docs/api</link>
> <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
> <link>http://java.sun.com/javase/6/docs/api</link>
> <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
> <link>http://commons.apache.org/logging/apidocs/</link>
> <link>http://junit.sourceforge.net/javadoc/</link>
> <link>http://logging.apache.org/log4j/1.2/apidocs/</link>
> </links>
> </configuration>
> </plugin>
> .....
>
> CHEERS :)
>
>
> On Fri, Apr 3, 2009 at 2:54 PM, Wayne Fay <wa...@gmail.com> wrote:
>
>>> Checkstyle + Other reporting plugin's are not to blame here :)
>>> I've no
>> doubt
>>> they need the extra memory. However, it's not being given to them. I
>>> have "set MAVEN_OPTS=-Xms256m -Xmx1024m -XX:MaxPermSize=256" in
>>> mvn.bat,
>>> this does not fix the problem (not even on my machine). Plus I'd
>>> like a
>> more
>>> portable solution if possible.
>>
>> First off, the <argLine> node under m-checkstyle-p is not supported.
>> You can see this for yourself in the plugin docs. So I'm not
>> surprised
>> its "not being given" to that plugin.
>>
>> Second, MaxPermSize=256 is going to literally set MaxPermSize to 256
>> bytes. I doubt this is what you want. If you copied and pasted this
>> out of your file, then I am not surprised that it does not "fix the
>> problem." ;-)
>>
>> As for portability, I think the most pragmatic thing would be to
>> solve
>> your problem on one machine, then worry about making it work other
>> places.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> 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
Re: Reporting Plugin's and OutOfMemoryException's
Posted by Andrew Hughes <ah...@gmail.com>.
Hi Wayne, thanks again.. as you rightfully point out I have some incorrect
argLine usage that I had copy/pasted from another plugin where it was
applicable.
One problem seems to be with the javadoc plugin... there's a few weird
things going on.
+ The argline was wrong and this is how it's done...
http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#How_to_increase_Javadoc_heap_size
+ Each Module is called MANY times by the plugin (over and over and....
site:site takes about 15/20 mins to build - frustration).
+ Even with 1g of mem I still get OutOfMemoryError, indicates memory size is
not the problems source.
Each module site:site, seems to trigger a site:site of all OTHER modules
(order n^2). I suspected that this has something to do with aggregate but I
have tried both true&false and it just keeps on calling the modules over and
over and.... again. I've also fixed the version to 2.5 so that others take a
look at the same plugin as me
This is my javadoc plugin if someone wants to take it for a quick spin...
<project>
<reporting>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>1g</maxmemory>
<source>1.6</source>
<aggregate>true</aggregate>
<doclet>gr.spinellis.umlgraph.doclet.UmlGraphDoc</doclet>
<docletArtifact>
<groupId>gr.spinellis</groupId>
<artifactId>UmlGraph</artifactId>
<version>4.6</version>
</docletArtifact>
<additionalparam>
-inferrel -inferdep -quiet -hide java.*
-collpackages java.util.* -qualify
-postfixpackage -nodefontsize 9
-nodefontpackagesize 7
</additionalparam>
<links>
<link>http://java.sun.com/j2se/1.4.2/docs/api</link>
<link>http://java.sun.com/j2ee/1.4/docs/api</link>
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
<link>http://java.sun.com/javase/6/docs/api</link>
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
<link>http://commons.apache.org/logging/apidocs/</link>
<link>http://junit.sourceforge.net/javadoc/</link>
<link>http://logging.apache.org/log4j/1.2/apidocs/</link>
</links>
</configuration>
</plugin>
.....
CHEERS :)
On Fri, Apr 3, 2009 at 2:54 PM, Wayne Fay <wa...@gmail.com> wrote:
> > Checkstyle + Other reporting plugin's are not to blame here :) I've no
> doubt
> > they need the extra memory. However, it's not being given to them. I
> > have "set MAVEN_OPTS=-Xms256m -Xmx1024m -XX:MaxPermSize=256" in mvn.bat,
> > this does not fix the problem (not even on my machine). Plus I'd like a
> more
> > portable solution if possible.
>
> First off, the <argLine> node under m-checkstyle-p is not supported.
> You can see this for yourself in the plugin docs. So I'm not surprised
> its "not being given" to that plugin.
>
> Second, MaxPermSize=256 is going to literally set MaxPermSize to 256
> bytes. I doubt this is what you want. If you copied and pasted this
> out of your file, then I am not surprised that it does not "fix the
> problem." ;-)
>
> As for portability, I think the most pragmatic thing would be to solve
> your problem on one machine, then worry about making it work other
> places.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Reporting Plugin's and OutOfMemoryException's
Posted by Wayne Fay <wa...@gmail.com>.
> Checkstyle + Other reporting plugin's are not to blame here :) I've no doubt
> they need the extra memory. However, it's not being given to them. I
> have "set MAVEN_OPTS=-Xms256m -Xmx1024m -XX:MaxPermSize=256" in mvn.bat,
> this does not fix the problem (not even on my machine). Plus I'd like a more
> portable solution if possible.
First off, the <argLine> node under m-checkstyle-p is not supported.
You can see this for yourself in the plugin docs. So I'm not surprised
its "not being given" to that plugin.
Second, MaxPermSize=256 is going to literally set MaxPermSize to 256
bytes. I doubt this is what you want. If you copied and pasted this
out of your file, then I am not surprised that it does not "fix the
problem." ;-)
As for portability, I think the most pragmatic thing would be to solve
your problem on one machine, then worry about making it work other
places.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Reporting Plugin's and OutOfMemoryException's
Posted by Andrew Hughes <ah...@gmail.com>.
Hi Wayne,
thanks for the reply!!!!
Checkstyle + Other reporting plugin's are not to blame here :) I've no doubt
they need the extra memory. However, it's not being given to them. I
have "set MAVEN_OPTS=-Xms256m -Xmx1024m -XX:MaxPermSize=256" in mvn.bat,
this does not fix the problem (not even on my machine). Plus I'd like a more
portable solution if possible.
Someone said that the reporting processes fork, and this would drop
the MAVEN_OPTS JXM settings. I can't say if this is actually true or not.
Still stuck on this, more help would be great :)
--AH
On Thu, Apr 2, 2009 at 3:44 PM, Wayne Fay <wa...@gmail.com> wrote:
> > java.lang.OutOfMemoryError: Java heap space
> > at java.util.Arrays.copyOf(Arrays.java:2882)
> > at
> >
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>
> What about this makes you think checkstyle is to blame?
>
> > <artifactId>maven-checkstyle-plugin</artifactId>
> > <argLine>-Xmx512m -Xms128m</argLine>
>
> Did you try bumping those numbers higher, say 768m or 1024m?
>
> Have you tried configuring things via MAVEN_OPTS? I know you want a
> solution that "works everywhere", but until you solve it on your PC,
> there's little point in worrying about the others, right?
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Reporting Plugin's and OutOfMemoryException's
Posted by Wayne Fay <wa...@gmail.com>.
> java.lang.OutOfMemoryError: Java heap space
> at java.util.Arrays.copyOf(Arrays.java:2882)
> at
> java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
What about this makes you think checkstyle is to blame?
> <artifactId>maven-checkstyle-plugin</artifactId>
> <argLine>-Xmx512m -Xms128m</argLine>
Did you try bumping those numbers higher, say 768m or 1024m?
Have you tried configuring things via MAVEN_OPTS? I know you want a
solution that "works everywhere", but until you solve it on your PC,
there's little point in worrying about the others, right?
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org