saiddfhi / gwt-maven

Automatically exported from code.google.com/p/gwt-maven
0 stars 0 forks source link

Silent failure when GWT runs out of memory #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is this Maven 1 or Maven 2?
Maven 2

What steps will reproduce the problem?
1. Create a project with a large classpath and many dependencies. (All 
dependencies in my case are 
listed below)
2. Execute 'mvn compile' with the GWT-Maven plugin settings listed below.

What is the expected output? What do you see instead?
Compilation should succeed, as expected. Instead, no errors are produced, build 
completes 
successfully, but no GWT-compiled code is output.

What version of the product are you using? On what operating system?
Mac OS X 10.5, gwt-maven beta19

GWT-Maven Plugin Settings:
            <plugin>
                <groupId>com.totsp.gwt</groupId>
                <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
                <version>2.0-beta19</version>
                <configuration>
                    <gwtVersion>${gwt.version}</gwtVersion>
                    <style>PRETTY</style>
                    <logLevel>INFO</logLevel>
                    <noServer>true</noServer>
                    <port>${gwt.port.hosted}</port>
                    <runTarget>${gwt.runUrl}</runTarget>
                    <compileTargets>
                        <param>${gwt.target}</param>
                    </compileTargets>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>setup</goal>
                            <goal>extractGwt</goal>
                            <goal>compile</goal>
                            <goal>testGwt</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Work Around:
Added extraJvmArgs option to plugin configuration:
<extraJvmArgs>-Xmx256m -Xms256m</extraJvmArgs>

Adding the extra arguments perfectly resolved the issue, but there was no 
indication that a lack of 
heap space might have been the culprit. Perhaps logging a message if GWT fails 
would be nice?

Please provide any additional information below.

All Dependencies in my Project to cause GWT to (presumably) run out of heap 
space:
aopalliance aopalliance 1.0 -   jar 
com.sun.xml.bind    jaxb-impl   2.1.3   -   jar 
com.sun.xml.messaging.saaj  saaj-impl   1.3 -   jar 
com.sun.xml.wss xws-security    2.0-FCS -   jar 
com.turner.playon.event playon-event-commons    0.3.6   -   jar 
commons-codec   commons-codec   1.2 -   jar 
commons-httpclient  commons-httpclient  3.1 -   jar 
commons-logging commons-logging 1.1.1   -   jar 
javax.activation    activation  1.0.2   -   jar 
javax.xml.bind  jaxb-api    2.1 -   jar 
javax.xml.soap  saaj-api    1.3 -   jar 
javax.xml.stream    stax-api    1.0-2   -   jar 
log4j   log4j   1.2.15  -   jar 
org.apache.santuario    xmlsec  1.4.0   -   jar 
org.apache.ws.commons.schema    XmlSchema   1.3.2   -   jar 
org.apache.ws.security  wss4j   1.5.4   -   jar 
org.springframework spring-aop  2.5.4   -   jar 
org.springframework spring-beans    2.5.3   -   jar 
org.springframework spring-context  2.5.3   -   jar 
org.springframework spring-context-support  2.5.3   -   jar 
org.springframework spring-core 2.5.3   -   jar 
org.springframework spring-tx   2.5.4   -   jar 
org.springframework spring-web  2.5.3   -   jar 
org.springframework.ws  spring-oxm  1.5.2   -   jar 
org.springframework.ws  spring-oxm-tiger    1.5.2   -   jar 
org.springframework.ws  spring-ws-core  1.5.2   -   jar 
org.springframework.ws  spring-ws-core-tiger    1.5.2   -   jar 
org.springframework.ws  spring-ws-security  1.5.2   -   jar 
org.springframework.ws  spring-xml  1.5.2   -   jar 
stax    stax-api    1.0.1   -   jar 
wsdl4j  wsdl4j  1.6.1   -   jar 
xml-security    xmlsec  2.0.0   -   jar

Original issue reported on code.google.com by jarrod.c...@gmail.com on 2 Jun 2008 at 5:09

GoogleCodeExporter commented 9 years ago
Also this information for the plugin configuration:

        <gwt.port.debug>8001</gwt.port.debug>
        <gwt.port.hosted>8080</gwt.port.hosted>
        <gwt.runUrl>
            ${project.artifactId}/${gwt.target}/Manager.html
        </gwt.runUrl>
        <gwt.target>com.turner.playon.manager.Manager</gwt.target>
        <gwt.version>1.5.0-rc1</gwt.version>

Original comment by jarrod.c...@gmail.com on 2 Jun 2008 at 5:10

GoogleCodeExporter commented 9 years ago
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-gwt-sample
[INFO]    task-segment: [gwt:compile]
[INFO] ------------------------------------------------------------------------
[INFO] [gwt:compile]
[INFO] establishing classpath list (buildClaspathList - scope = COMPILE)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for GWT 
dependencies
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit 
exceeded
    at java.util.regex.Pattern.matcher(Pattern.java:888)
    at java.util.regex.Pattern.split(Pattern.java:997)
    at java.lang.String.split(String.java:2293)
    at java.lang.String.split(String.java:2335)
    at
com.google.gwt.dev.resource.impl.PathPrefixSet.includesResource(PathPrefixSet.ja
va:236)
    at
com.google.gwt.dev.resource.impl.ZipFileClassPathEntry.computeApplicableResource
s(ZipFileClassPathEntry.java:120)
    at
com.google.gwt.dev.resource.impl.ZipFileClassPathEntry.findApplicableResources(Z
ipFileClassPathEntry.java:75)
    at
com.google.gwt.dev.resource.impl.ResourceOracleImpl.refresh(ResourceOracleImpl.j
ava:265)
    at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:436)
    at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:273)
    at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:127)
    at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:108)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:562)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
    at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Exception attempting to run script - compile.sh

Embedded error: compile.sh script exited abnormally with code - 1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch

Original comment by charlie....@gmail.com on 9 Sep 2008 at 12:23

GoogleCodeExporter commented 9 years ago
Thank you very much, this helped me out. I missed have been trying all kinds of
MAVEN_OPTS, but this line <extraJvmArgs>-Xmx256m -Xms256m</extraJvmArgs> solved 
my issue.

Regards. Ole Andreas

Original comment by olehe...@gmail.com on 26 Mar 2009 at 1:58

GoogleCodeExporter commented 9 years ago
which file did you add the piece of xml below?

<extraJvmArgs>-Xmx256m -Xms256m</extraJvmArgs>

 thanks
   - Bob

Original comment by robert_l...@verizon.net on 5 Jun 2009 at 7:56