Erro executando war - Java heap space
09/11/2016 20:03
0
Prezados membros.

Estou com erro na geração do war: Java heap space.

Já dei ClearAll na aplicação. Compile. Tudo funciona.

Mas na criação do war não.

Meu BuildConfig está assim:

grails.project.fork = [
// configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
//compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],

// configure settings for the test-app JVM, uses the daemon by default
test: [maxMemory: 1024, minMemory: 128, debug: false, daemon:true],
// configure settings for the run-app JVM
run: [maxMemory: 4560, minMemory: 1024, debug: false, forkReserve:false],
// configure settings for the run-war JVM
war: [maxMemory: 4560, minMemory: 2560, debug: false, forkReserve:false],
// configure settings for the Console UI JVM
console: [maxMemory: 768, minMemory: 64, debug: false]
]

Tags: Grails,war,error, java heap space


0
Ao gerar com grails war --verbose dá a seguinte mensagem:

ng 1 source files          
| Compiling 1 source files.....
| Compiling 1 GSP file for package [jasper].            
| Building WAR file                          
| Building WAR file...
| Building WAR file....
| Building WAR file.....
    [mkdir] Created dir: C:\jobEasier\target\stage\plugins\shiro-1.2.1
     [copy] Copying 36 files to C:\jobEasier\target\stage\plugins\shiro-1.2.1
    [mkdir] Created dir: C:\jobEasier\target\stage\plugins\remote-pagination-0.4.8
     [copy] Copying 25 files to C:\jobEasier\target\stage\plugins\remote-pagination-0.4.8
    [mkdir] Created dir: C:\jobEasier\target\stage\plugins\jquery-ui-1.10.3
     [copy] Copying 94 files to C:\jobEasier\target\stage\plugins\jquery-ui-1.10.3
    [mkdir] Created dir: C:\jobEasier\target\stage\plugins\jquery-1.11.1
     [copy] Copying 3 files to C:\jobEasier\target\stage\plugins\jquery-1.11.1
    [mkdir] Created dir: C:\jobEasier\target\stage\plugins\jasper-1.11.0
     [copy] Copying 24 files to C:\jobEasier\target\stage\plugins\jasper-1.11.0
    [mkdir] Created dir: C:\jobEasier\target\stage\plugins\filter-0.2
     [copy] Copying 31 files to C:\jobEasier\target\stage\plugins\filter-0.2
     [copy] Copying 1822 files to C:\jobEasier\target\stage\WEB-INF\grails-app
     [copy] Copied 180 empty directories to 22 empty directories under C:\jobEasier\target\stage\WEB-INF\grai
ls-app
     [copy] Copying 621 files to C:\jobEasier\target\stage\WEB-INF\classes
     [copy] Copying 17249 files to C:\jobEasier\target\stage\WEB-INF\classes
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\spring
     [copy] Copying 64 files to C:\jobEasier\target\stage\WEB-INF\classes
     [copy] Copying 220 files to C:\jobEasier\target\stage\WEB-INF\lib
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF
   [delete] Deleting: C:\jobEasier\target\resources\web.xml
[propertyfile] Updating property file: C:\jobEasier\target\stage\WEB-INF\classes\application.properties
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\scaffolding-2.1.2
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\scaffolding-2.1.2
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\cache-1.1.8
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\cache-1.1.8
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\webxml-1.4.1
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\webxml-1.4.1
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\asset-pipeline-2.6.9
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\asset-pipeline-2.6.9
     [copy] Copying 2 files to C:\jobEasier\target\stage\WEB-INF\classes
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\joda-time-1.5
     [copy] Copying 9 files to C:\jobEasier\target\stage\WEB-INF\plugins\joda-time-1.5
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\hibernate4-4.3.6.1
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\hibernate4-4.3.6.1
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\database-migration-1.4.1
     [copy] Copying 5 files to C:\jobEasier\target\stage\WEB-INF\plugins\database-migration-1.4.1
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\jquery-1.11.1
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\jquery-1.11.1
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\jquery-ui-1.10.3
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\jquery-ui-1.10.3
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\jasper-1.11.0
     [copy] Copying 3 files to C:\jobEasier\target\stage\WEB-INF\plugins\jasper-1.11.0
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\web-snaps-0.1
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\plugins\web-snaps-0.1
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\shiro-1.2.1
     [copy] Copying 2 files to C:\jobEasier\target\stage\WEB-INF\plugins\shiro-1.2.1
     [copy] Copying 1 file to C:\jobEasier\target\stage\WEB-INF\classes
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\remote-pagination-0.4.8
     [copy] Copying 2 files to C:\jobEasier\target\stage\WEB-INF\plugins\remote-pagination-0.4.8
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\plugins\filter-0.2
     [copy] Copying 2 files to C:\jobEasier\target\stage\WEB-INF\plugins\filter-0.2
    [mkdir] Created dir: C:\jobEasier\target\stage\WEB-INF\templates\scaffolding
     [copy] Copying 12 files to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\AsyncController.g
roovy to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding\AsyncController.groovy
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\AsyncSpec.groovy
to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding\AsyncSpec.groovy
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\Controller.groovy
 to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding\Controller.groovy
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\RestfulController
.groovy to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding\RestfulController.groovy
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\RestfulSpec.groov
y to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding\RestfulSpec.groovy
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\Spec.groovy to C:
\jobEasier\target\stage\WEB-INF\templates\scaffolding\Spec.groovy
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\_form.gsp to C:\j
obEasier\target\stage\WEB-INF\templates\scaffolding\_form.gsp
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\create.gsp to C:\
jobEasier\target\stage\WEB-INF\templates\scaffolding\create.gsp
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\edit.gsp to C:\jo
bEasier\target\stage\WEB-INF\templates\scaffolding\edit.gsp
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\index.gsp to C:\j
obEasier\target\stage\WEB-INF\templates\scaffolding\index.gsp
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\renderEditor.temp
late to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding\renderEditor.template
     [copy] Copying C:\jobEasier\target\plugins\scaffolding-2.1.2\src\templates\scaffolding\show.gsp to C:\jo
bEasier\target\stage\WEB-INF\templates\scaffolding\show.gsp
     [copy] Copying 54 files to C:\jobEasier\target\stage\WEB-INF\templates\scaffolding
     [copy] Copied 9 empty directories to 5 empty directories under C:\jobEasier\target\stage\WEB-INF\templat
es\scaffolding
| Processing File 57 of 3594 - frontend/home-bg.psd                  
| Processing File 57 of 3594 - frontend/home-bg.psd.
| Error Error executing script War: GC overhead limit exceeded
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.lang.reflect.Array.get(Native Method)
        at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.primitiveArrayToList(DefaultTyp
eTransformation.java:521)
        at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.arrayAsCollection(DefaultTypeTr
ansformation.java:479)
        at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.asCollection(DefaultTypeTransfo
rmation.java:445)
        at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.asArray(DefaultTypeTransformati
on.java:415)
        at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransform
ation.java:214)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:603)
        at asset.pipeline.GenericAssetFile.getBytes(GenericAssetFile.groovy:66)
        at sun.reflect.GeneratedMethodAccessor205.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1847)
        at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1153)
        at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3737)
        at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1165)
        at asset.pipeline.AbstractAssetFile.getProperty(AbstractAssetFile.groovy)
        at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:50)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
        at asset.pipeline.AssetCompiler.compile(AssetCompiler.groovy:209)
        at asset.pipeline.AssetCompiler$compile.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
        at _AssetCompile_groovy$_run_closure2.doCall(_AssetCompile_groovy:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
| Error Error executing script War: GC overhead limit exceeded
?
09/11/2016 20:14


1
Resolvido:
Editar o arquivo startGrails.bat
Utilizar os seguintes parâmetros:
----------
if "%GRAILS_OPTS%" == "" (
set GRAILS_OPTS=-server -Xmx1024M -Xms64M -Dfile.encoding=UTF-8
if not "%GRAILS_NO_PERMGEN%" == "1" (
set GRAILS_OPTS=-server -Xmx1024M -Xms64M -XX:PermSize=364m -XX:MaxPermSize=512m -Dfile.encoding=UTF-8
)
)
10/11/2016 18:23



Ainda não faz parte da comunidade???

Para se registrar, clique aqui.


Aprenda Groovy e Grails com a Formação itexto!

Newsletter Semana Groovy

Assinar

Envie seu link!


Livro de Grails


/dev/All

Os melhores blogs de TI (e em português) em um único lugar!

 
Creative Commons
RSS Grails Brasil é mantido por itexto Consultoria.
Em caso de problemas contacte Henrique Lobo Weissmann (Kico) por e-mail: kico@itexto.com.br
Todo o conteúdo presente neste site adota o Creative Commons como licença padrão.
Ver: 4.14.0
itexto