This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 168482 - OutOfMemoryError from grails run or test with too many grails plugins
Summary: OutOfMemoryError from grails run or test with too many grails plugins
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Grails (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 14:31 UTC by therrick
Modified: 2009-08-04 09:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description therrick 2009-07-13 14:31:18 UTC
If a grails project includes too many grails plugins (around 14 or 15, but this probably varies based on the size of the 
plugin), attempting to test or run the project in NetBeans leads to an OutOfMemoryError.  I've tried the plugins in 
various combinations and there's no single plugin that causes. I can mix and match them however I want as long as I 
don't add too many.  

I've tried increasing the available memory by setting "-J-Xmx1024m" in netbeans.conf and setting "-Xmx1024m" in my 
JAVA_OPTS environment variable. Neither seems to make any difference. 

Note that I got the same error in the command line build (ant test) until I increased memory via "SET ANT_OPTS=-Xms256m 
-Xmx1024m".  However, I can't find anywhere to make a similar change for NetBeans.  If I set the ANT_OPTS environment 
variable before launching NetBeans, it seems to have no effect.

Here's the error that is returned from the 'run' action in NetBeans:
... 
Running Grails application.. 
loading security config ... 
2009-07-07 12:10:12,224 [main] ERROR plugins.DefaultGrailsPluginManager  - Error configuring dynamic methods for plugin 
[validation:1.1.1]: java.lang.OutOfMemoryError: Java heap space 
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.OutOfMemoryError: Java heap space 
        at _GrailsBootstrap_groovy$_run_closure2_closure13.doCall(_GrailsBootstrap_groovy:86) 
        at _GrailsBootstrap_groovy$_run_closure2_closure13.doCall(_GrailsBootstrap_groovy) 
        at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:274) 
... 

Here's the list of grails plugins in my project (and a few other details from application.properties):
app.grails.version=1.1.1 
app.name=registry 
app.servlet.version=2.4 
app.version=0.1 
plugins.acegi=0.5.1 
plugins.autobase=0.8.5 
plugins.build-test-data=0.2.1 
plugins.code-coverage=1.1.6 
plugins.export=0.3 
plugins.filterpane=0.5 
plugins.fixtures=0.8 
plugins.hibernate=1.1.1 
plugins.ldap=0.8.2 
plugins.liquibase=1.9.3.0 
plugins.lookups=1.2 
plugins.mail=0.7.1 
plugins.navigation=1.1 
plugins.quartz=0.4.1 
plugins.settings=1.2
Comment 1 Petr Hejl 2009-07-27 12:19:01 UTC
As a workaround you can edit startGrails.bat and unconditionally put -Xmx to JAVA_OPTS (search for related lines).
NetBeans will provide UI in properties dialog to configure JAVA_OPTS.
Comment 2 Petr Hejl 2009-07-27 14:20:55 UTC
Fixed in web-main fc668812839b.
Comment 3 Petr Hejl 2009-07-27 14:37:43 UTC
There may be some troubles on *nix: http://jira.codehaus.org/browse/GRAILS-4897
Comment 4 Quality Engineering 2009-07-28 05:47:48 UTC
Integrated into 'main-golden', will be available in build *200907280201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fc668812839b
User: phejl@netbeans.org
Log: #168482 OutOfMemoryError from grails run or test with too many grails plugins
Comment 5 ejvyas 2009-08-04 04:26:50 UTC
Where is startGrails.bat?? This happens in basic Grails project. Does not need to use many plugins for this to happen
Comment 6 Petr Hejl 2009-08-04 09:22:36 UTC
GRAILS_HOME/bin